- Notifications
You must be signed in to change notification settings - Fork567
Commitf55a79a
committed
feat: increase the default value of pingTimeout
This value was updated from 60000 to 5000 in [1], included in`engine.io@3.2.0` (Feb 2018).The reasoning back then:Some users experienced long delays between disconnection on theserver-side and on the client-side. The "disconnect" event would take along time to fire in the browser, probably due to a timer beingdelayed. Hence the change.That being said, the current value (5s) now causes unexpecteddisconnections when a big payload is sent over a slow network, becauseit prevents the ping-pong packets from being exchanged between theclient and the server. This can also happen when a synchronous taskblocks the server for more than 5 seconds.The new value (20s) thus seems like a good balance between quickdisconnection detection and tolerance to various delays.Note: pingInterval + pingTimeout is still below the threshold of ReactNative, which complains if a timer is set with a delay of more than 1minute.[1]:65b1ad1Related:-socketio/socket.io#2770-socketio/socket.io#2769-socketio/socket.io#3054-socketio/socket.io#3376Backported from5a7fa131 parent1f5d469 commitf55a79a
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments
Comments
(0)