bdy 1.25.12-stage → 1.25.13-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/distTs/package.json
CHANGED
|
@@ -52,7 +52,6 @@ class SshClient extends events_1.default {
|
|
|
52
52
|
return new Promise((resolve, reject) => {
|
|
53
53
|
this.close();
|
|
54
54
|
this.client = new ssh2.Client();
|
|
55
|
-
this.client.setNoDelay();
|
|
56
55
|
this.client.on('ready', () => {
|
|
57
56
|
if (this.client) {
|
|
58
57
|
this.client.removeAllListeners();
|
|
@@ -89,6 +88,11 @@ class SshClient extends events_1.default {
|
|
|
89
88
|
username: this.username,
|
|
90
89
|
password: this.password,
|
|
91
90
|
});
|
|
91
|
+
// ssh2 only forwards setNoDelay to a socket it already has, and connect() is what creates
|
|
92
|
+
// it - called before connect() this was a silent no-op, leaving Nagle on the tunnel. With
|
|
93
|
+
// Nagle, every small request/response over a channel (a Postgres query, a TCP ping) waited
|
|
94
|
+
// for the worker's delayed ACK and paid ~70ms on top of the network RTT.
|
|
95
|
+
this.client.setNoDelay();
|
|
92
96
|
}
|
|
93
97
|
catch (err) {
|
|
94
98
|
reject(err);
|