Revert "*Store copy of activeRelay size to prevent infinite loop"
This reverts commit 7cb32b716a
.
This commit is contained in:
parent
58ba247740
commit
cb16b87b73
|
@ -130,12 +130,9 @@ export default class DHT {
|
|||
if (0 === available.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const activeRelays = this._activeRelays.size;
|
||||
|
||||
while (
|
||||
this._activeRelays.size <=
|
||||
Math.min(this._maxConnections, available.length + activeRelays)
|
||||
Math.min(this._maxConnections, available.length + this._activeRelays.size)
|
||||
) {
|
||||
const relayIndex = await randomNumber(0, available.length - 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue