Skip to content

Commit 1f7b831

Browse files
use -1 instead of Infinity
1 parent 2154423 commit 1f7b831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/lib/connection_manager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ export class ConnectionManager
199199
conn.tags = Array.from(new Set([...conn.tags, ...tags]));
200200
});
201201

202-
// instead of deleting the peer from the peer store, we set the dial attempt to Infinity
202+
// instead of deleting the peer from the peer store, we set the dial attempt to -1
203203
// this helps us keep track of peers that have been dialed before
204-
this.dialAttemptsForPeer.set(peerId.toString(), Infinity);
204+
this.dialAttemptsForPeer.set(peerId.toString(), -1);
205205

206206
// Dialing succeeded, break the loop
207207
break;

0 commit comments

Comments
 (0)