We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff3c36c commit 585911cCopy full SHA for 585911c
lib/connection.js
@@ -54,7 +54,9 @@ class Connection extends EventEmitter {
54
55
// Optionally enable keep-alive on the socket.
56
if (this.config.enableKeepAlive) {
57
- this.stream.setKeepAlive(true, this.config.keepAliveInitialDelay);
+ this.stream.on('connect', () => {
58
+ this.stream.setKeepAlive(true, this.config.keepAliveInitialDelay);
59
+ });
60
}
61
62
// Enable TCP_NODELAY flag. This is needed so that the network packets
0 commit comments