From e651338ff37055eca87fa17077483f26714bde9b Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Fri, 27 Jan 2017 10:01:35 +0200 Subject: [PATCH] pool: graceful disconnect - minor fix --- lib/net/pool.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/net/pool.js b/lib/net/pool.js index e0c6113d..77d0885d 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -1156,8 +1156,10 @@ Pool.prototype.handleClose = co(function* handleClose(peer, connected) { if (!outbound) return; - if(!this.disconnecting) - this.refill(); + if(this.disconnecting) + return; + + this.refill(); }); /**