Skip to content

Commit

Permalink
fix: pass abort signal to peer routing query (#2888)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
achingbrain authored Dec 12, 2024
1 parent d3e5a33 commit 3c63482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libp2p/src/connection-manager/dial-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export class DialQueue {
this.log('looking up multiaddrs for %p in the peer routing', peerId)

try {
const peerInfo = await this.components.peerRouting.findPeer(peerId)
const peerInfo = await this.components.peerRouting.findPeer(peerId, options)

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

Expand Down

0 comments on commit 3c63482

Please sign in to comment.