chore: Do not catch any error when sendHeads.

This commit is contained in:
Hayden Young 2023-10-11 23:20:13 +01:00
parent e1a163bce7
commit 78dab50eb8

View File

@ -152,13 +152,9 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
const sendHeads = async (source) => {
return (async function * () {
try {
const heads = await log.heads()
for await (const { bytes } of heads) {
yield bytes
}
} catch (err) {
console.log('onPeerJoined', ipfs.libp2p.peerId.toString())
const heads = await log.heads()
for await (const { bytes } of heads) {
yield bytes
}
})()
}