Skip to content

Commit 65b1ad1

Browse files
[chore] Update default values for pingTimeout (#551)
`pingTimeout` now defaults to 5 seconds instead of 60 seconds.
1 parent 63e2528 commit 65b1ad1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ to a single process.
196196
- `Object`: optional, options object
197197
- **Options**
198198
- `pingTimeout` (`Number`): how many ms without a pong packet to
199-
consider the connection closed (`60000`)
199+
consider the connection closed (`5000`)
200200
- `pingInterval` (`Number`): how many ms before sending a new ping
201201
packet (`25000`)
202202
- `upgradeTimeout` (`Number`): how many ms before an uncompleted transport upgrade is cancelled (`10000`)

lib/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Server (opts) {
3737
opts = opts || {};
3838

3939
this.wsEngine = opts.wsEngine || process.env.EIO_WS_ENGINE || 'ws';
40-
this.pingTimeout = opts.pingTimeout || 60000;
40+
this.pingTimeout = opts.pingTimeout || 5000;
4141
this.pingInterval = opts.pingInterval || 25000;
4242
this.upgradeTimeout = opts.upgradeTimeout || 10000;
4343
this.maxHttpBufferSize = opts.maxHttpBufferSize || 10E7;

0 commit comments

Comments
 (0)