Skip to content

Commit

Permalink
Release 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Oct 22, 2018
1 parent 498c8f1 commit 0de1968
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
10 changes: 10 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

4.0.0 / 2018-10-23
==================

**features**
* [[`5c9f3bb`](http://github.com/node-modules/agentkeepalive/commit/5c9f3bbd60555744edcf777105b148982a1a42b6)] - feat: impl the new Agent extend http.Agent (fengmk2 <<fengmk2@gmail.com>>)

**others**
* [[`498c8f1`](http://github.com/node-modules/agentkeepalive/commit/498c8f13cf76600d3dd6e1c91cdf2d8292355dff)] - chore: move LICENSE from readme to file (fengmk2 <<fengmk2@gmail.com>>)
* [[`4f39894`](http://github.com/node-modules/agentkeepalive/commit/4f398942ba2f90cf4501239e56ac4e6344931a01)] - bugfix: support agent.options.timeout on https agent (fengmk2 <<fengmk2@gmail.com>>)

3.5.2 / 2018-10-19
==================

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ The enhancement features `keep alive` `http.Agent`. Support `http` and `https`.
- Add active socket timeout: avoid long time inactivity socket leak in the active-sockets queue.
- TTL for active socket.

## Node.js version required

Support Node.js >= `8.0.0`

## Install

```bash
Expand Down
5 changes: 1 addition & 4 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@ class Agent extends OriginalAgent {
// Sets the socket to timeout after timeout milliseconds of inactivity on the socket.
// By default is double free socket timeout.
if (options.timeout === undefined) {
options.timeout = options.freeSocketTimeout * 2;
// make sure socket default inactivity timeout >= 30s
if (options.timeout < 30000) {
options.timeout = 30000;
}
options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);
}

// support humanize format
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentkeepalive",
"version": "3.5.2",
"version": "4.0.0",
"description": "Missing keepalive http.Agent",
"main": "index.js",
"browser": "browser.js",
Expand Down

0 comments on commit 0de1968

Please sign in to comment.