From 2c3d15c73466c798a6b44aca420ad8da08bad9ec Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 29 Mar 2023 14:48:15 -0400 Subject: [PATCH] *Use swarmEvents not swarm.onceSelf to emit the close --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 53b43f5..dcfcaa5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -359,7 +359,7 @@ async function handleListenConnections(aq: ActiveQuery) { }; const hookClose = () => { - swarm.onceSelf("close", closeCb); + swarmEvent?.once("close", closeCb); }; if (swarm.activeRelay) {