Skip to content

Commit

Permalink
[chore] Update default values for pingTimeout (#551)
Browse files Browse the repository at this point in the history
`pingTimeout` now defaults to 5 seconds instead of 60 seconds.
  • Loading branch information
darrachequesne committed Feb 27, 2018
1 parent 63e2528 commit 65b1ad1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ to a single process.
- `Object`: optional, options object
- **Options**
- `pingTimeout` (`Number`): how many ms without a pong packet to
consider the connection closed (`60000`)
consider the connection closed (`5000`)
- `pingInterval` (`Number`): how many ms before sending a new ping
packet (`25000`)
- `upgradeTimeout` (`Number`): how many ms before an uncompleted transport upgrade is cancelled (`10000`)
Expand Down
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Server (opts) {
opts = opts || {};

this.wsEngine = opts.wsEngine || process.env.EIO_WS_ENGINE || 'ws';
this.pingTimeout = opts.pingTimeout || 60000;
this.pingTimeout = opts.pingTimeout || 5000;
this.pingInterval = opts.pingInterval || 25000;
this.upgradeTimeout = opts.upgradeTimeout || 10000;
this.maxHttpBufferSize = opts.maxHttpBufferSize || 10E7;
Expand Down

0 comments on commit 65b1ad1

Please sign in to comment.