Skip to content

Commit 3c63482

Browse files
authored
fix: pass abort signal to peer routing query (#2888)
Where we fail to find any addresses for a peer id we are dialing, and we perform a routing query to find their addresses, pass the dial abort signal in to the query to ensure it doesn't continue if we are no longer interested in the result.
1 parent d3e5a33 commit 3c63482

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/libp2p/src/connection-manager/dial-queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class DialQueue {
349349
this.log('looking up multiaddrs for %p in the peer routing', peerId)
350350

351351
try {
352-
const peerInfo = await this.components.peerRouting.findPeer(peerId)
352+
const peerInfo = await this.components.peerRouting.findPeer(peerId, options)
353353

354354
this.log('found multiaddrs for %p in the peer routing', peerId, addrs.map(({ multiaddr }) => multiaddr.toString()))
355355

0 commit comments

Comments
 (0)