Skip to content

Commit

Permalink
fix: include peer id in autodial log message (#2075)
Browse files Browse the repository at this point in the history
This seems to have been missed.
  • Loading branch information
achingbrain authored Sep 23, 2023
1 parent 972b10a commit 368ee26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/libp2p/src/connection-manager/auto-dial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ export class AutoDial implements Startable {
(peer) => {
// Remove peers without addresses
if (peer.addresses.length === 0) {
log.trace('not autodialing %p because they have no addresses')
log.trace('not autodialing %p because they have no addresses', peer.id)
return false
}

// remove peers we are already connected to
if (connections.has(peer.id)) {
log.trace('not autodialing %p because they are already connected')
log.trace('not autodialing %p because they are already connected', peer.id)
return false
}

// remove peers we are already dialling
if (dialQueue.has(peer.id)) {
log.trace('not autodialing %p because they are already being dialed')
log.trace('not autodialing %p because they are already being dialed', peer.id)
return false
}

// remove peers already in the autodial queue
if (this.queue.hasJob(peer.id)) {
log.trace('not autodialing %p because they are already being autodialed')
log.trace('not autodialing %p because they are already being autodialed', peer.id)
return false
}

Expand Down

0 comments on commit 368ee26

Please sign in to comment.