From 78dab50eb8ce428f4f4711e12647603bdd65a75c Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Wed, 11 Oct 2023 23:20:13 +0100 Subject: [PATCH] chore: Do not catch any error when sendHeads. --- src/sync.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/sync.js b/src/sync.js index 896ad2d..039da6f 100644 --- a/src/sync.js +++ b/src/sync.js @@ -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 } })() }