Skip to content

Commit 0de1968

Browse files
committed
Release 4.0.0
1 parent 498c8f1 commit 0de1968

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

History.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11

2+
4.0.0 / 2018-10-23
3+
==================
4+
5+
**features**
6+
* [[`5c9f3bb`](http://github.com/node-modules/agentkeepalive/commit/5c9f3bbd60555744edcf777105b148982a1a42b6)] - feat: impl the new Agent extend http.Agent (fengmk2 <<fengmk2@gmail.com>>)
7+
8+
**others**
9+
* [[`498c8f1`](http://github.com/node-modules/agentkeepalive/commit/498c8f13cf76600d3dd6e1c91cdf2d8292355dff)] - chore: move LICENSE from readme to file (fengmk2 <<fengmk2@gmail.com>>)
10+
* [[`4f39894`](http://github.com/node-modules/agentkeepalive/commit/4f398942ba2f90cf4501239e56ac4e6344931a01)] - bugfix: support agent.options.timeout on https agent (fengmk2 <<fengmk2@gmail.com>>)
11+
212
3.5.2 / 2018-10-19
313
==================
414

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ The enhancement features `keep alive` `http.Agent`. Support `http` and `https`.
3333
- Add active socket timeout: avoid long time inactivity socket leak in the active-sockets queue.
3434
- TTL for active socket.
3535

36+
## Node.js version required
37+
38+
Support Node.js >= `8.0.0`
39+
3640
## Install
3741

3842
```bash

lib/agent.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,8 @@ class Agent extends OriginalAgent {
4242
// Sets the socket to timeout after timeout milliseconds of inactivity on the socket.
4343
// By default is double free socket timeout.
4444
if (options.timeout === undefined) {
45-
options.timeout = options.freeSocketTimeout * 2;
4645
// make sure socket default inactivity timeout >= 30s
47-
if (options.timeout < 30000) {
48-
options.timeout = 30000;
49-
}
46+
options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);
5047
}
5148

5249
// support humanize format

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agentkeepalive",
3-
"version": "3.5.2",
3+
"version": "4.0.0",
44
"description": "Missing keepalive http.Agent",
55
"main": "index.js",
66
"browser": "browser.js",

0 commit comments

Comments
 (0)