chore: Do not catch any error when onPeerJoined.

This commit is contained in:
Hayden Young 2023-10-11 23:41:06 +01:00
parent e609d33ae8
commit 01d74aaa02

View File

@ -142,12 +142,8 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
let started = false
const onPeerJoined = async (peerId) => {
try {
const heads = await log.heads()
events.emit('join', peerId, heads)
} catch (err) {
console.log('onPeerJoined', ipfs.libp2p.peerId.toString(), err.stack)
}
const heads = await log.heads()
events.emit('join', peerId, heads)
}
const sendHeads = async (source) => {