Skip to content

Commit

Permalink
fix: unhandled error in heads exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
saul-jb committed Oct 16, 2023
1 parent fdb9dfd commit 91536e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/replicator/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ export class BootstrapReplicator extends Playable {
promises.push(Promise.resolve().then(async () => {
if (!await this.libp2p.peerStore.has(peer.id)) {
await this.libp2p.peerStore.save(peer.id, peer)

// We need to dial so that libp2p can update multiaddrs.
await this.libp2p.dial(peer.id)
}

// We need to dial so that libp2p can update multiaddrs.
await this.libp2p.dial(peer.id)

const stream = await this.libp2p.dialProtocol(peer.id, this.protocol)
await this.exchange(stream, peer.id)
}))
}).catch(() => {}))
}

// Don't really care if individual head syncs fail.
Expand Down

0 comments on commit 91536e8

Please sign in to comment.