From ce24ca1bd92d700595c3e7cada7388f76f6724af Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Mar 2023 11:14:31 -0400 Subject: [PATCH] *missing storing the socket --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index aa858dd..894ff19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -98,6 +98,10 @@ export class SwarmClient extends Client { this._sockets.delete(socketId); }); + if (!this._sockets.has(socketId)) { + this._sockets.set(socketId, socket); + } + this.emit("connection", socket); } );