From 95fab440150d4fc99c7aaf09829e604b69faec97 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 30 Jan 2017 15:47:55 -0800 Subject: [PATCH] hostlist: allow multiple refs even if full. --- lib/net/hostlist.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;