net: listen after connecting to outbound.

This commit is contained in:
Christopher Jeffrey 2017-03-05 15:40:02 -08:00
parent 664cddac42
commit c38a4fc031
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;
});