pool: fix startSync.

This commit is contained in:
Christopher Jeffrey 2016-12-31 03:21:36 -08:00
parent 933d80bb37
commit f8fa536129
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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