hostlist: allow multiple refs even if full.

This commit is contained in:
Christopher Jeffrey 2017-01-30 15:47:55 -08:00
parent 9cd70fb589
commit 95fab44015
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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