From c38a4fc03196ba1dba3a1ab88a5aa6f1fc21dae2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 5 Mar 2017 15:40:02 -0800 Subject: [PATCH] net: listen after connecting to outbound. --- lib/net/pool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net/pool.js b/lib/net/pool.js index 57c8cf5f..1d734dbf 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -293,8 +293,6 @@ Pool.prototype._connect = co(function* connect() { if (this.connected) return; - yield this.listen(); - if (this.address.isNull() && !this.options.proxy) { try { ip = yield this.getIP(); @@ -318,6 +316,8 @@ Pool.prototype._connect = co(function* connect() { this.fillOutbound(); + yield this.listen(); + this.connected = true; });