We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7df7904 commit fdf00f0Copy full SHA for fdf00f0
lib/Client.js
@@ -220,6 +220,13 @@ class Client extends EventEmitter {
220
return;
221
}
222
223
+ // Clear the default socket timeout for WebSocket connections
224
+ // WebSocket connections are long-lived and should not timeout
225
+ if (conn.setTimeout) {
226
+ conn.setTimeout(0);
227
+ this.debug('cleared socket timeout for websocket connection');
228
+ }
229
+
230
// websocket requests are special in that we simply re-create the header info
231
// then directly pipe the socket data
232
// avoids having to rebuild the request and handle upgrades via the http client
0 commit comments