diff --git a/src/index.ts b/src/index.ts index 8924c76..8299f85 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,7 +48,9 @@ async function handleReady(aq: ActiveQuery) { return resolveWithPeers(resolve); } - proxy.node.pool.on("full", resolveWithPeers); + proxy.node.pool.once("full", () => { + resolveWithPeers(resolve); + }); }); aq.respond();