From 9c904f7b4f19995976157e4df75e5147c85caf93 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 2 Jan 2016 05:16:58 -0800 Subject: [PATCH] fix potential uncatchable error. --- lib/bcoin/pool.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 32d6a8d2..4ba71931 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -440,9 +440,11 @@ Pool.prototype._load = function _load() { this.load.hiReached = false; - this.emit('debug', - 'Requesting inv packet from %s with getblocks', - this.peers.load.address); + if (this.peers.load) { + this.emit('debug', + 'Requesting inv packet from %s with getblocks', + this.peers.load.address); + } if (!this.options.fullNode) { next = function(hash) {