diff --git a/lib/net/hostlist.js b/lib/net/hostlist.js index 37f852cb..db720c7f 100644 --- a/lib/net/hostlist.js +++ b/lib/net/hostlist.js @@ -310,9 +310,6 @@ HostList.prototype.add = function add(addr, src) { var factor = 1; var i, entry, bucket; - if (this.isFull()) - return false; - entry = this.map[addr.hostname]; if (entry) { @@ -360,6 +357,9 @@ HostList.prototype.add = function add(addr, src) { if (util.random(0, factor) !== 0) return false; } else { + if (this.isFull()) + return false; + if (!src) src = this.address;