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.
2 parents c6173e5 + b694380 commit 016900fCopy full SHA for 016900f
lib/connection.js
@@ -55,6 +55,10 @@ class Connection extends EventEmitter {
55
// Enable keep-alive on the socket. It's disabled by default, but the
56
// user can enable it and supply an initial delay.
57
this.stream.setKeepAlive(true, this.config.keepAliveInitialDelay);
58
+
59
+ // Enable TCP_NODELAY flag. This is needed so that the network packets
60
+ // are sent immediately to the server
61
+ this.stream.setNoDelay(true);
62
}
63
// if stream is a function, treat it as "stream agent / factory"
64
} else if (typeof opts.config.stream === 'function') {
0 commit comments