hostlist: allow multiple refs even if full.
This commit is contained in:
parent
9cd70fb589
commit
95fab44015
@ -310,9 +310,6 @@ HostList.prototype.add = function add(addr, src) {
|
|||||||
var factor = 1;
|
var factor = 1;
|
||||||
var i, entry, bucket;
|
var i, entry, bucket;
|
||||||
|
|
||||||
if (this.isFull())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
entry = this.map[addr.hostname];
|
entry = this.map[addr.hostname];
|
||||||
|
|
||||||
if (entry) {
|
if (entry) {
|
||||||
@ -360,6 +357,9 @@ HostList.prototype.add = function add(addr, src) {
|
|||||||
if (util.random(0, factor) !== 0)
|
if (util.random(0, factor) !== 0)
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
if (this.isFull())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!src)
|
if (!src)
|
||||||
src = this.address;
|
src = this.address;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user