From f8fa53612952850904fb3634770ebb35f6fdd345 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 31 Dec 2016 03:21:36 -0800 Subject: [PATCH] pool: fix startSync. --- 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 54746339..0a8f4e1e 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -713,13 +713,13 @@ Pool.prototype.setLoader = function setLoader(peer) { */ Pool.prototype.startSync = co(function* startSync() { + yield this.connect(); + this.syncing = true; this.startInterval(); this.startTimeout(); - yield this.connect(); - if (!this.peers.load) { this.addLoader(); return;