Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer 4cd89acb12
*update dist 2023-04-06 10:08:44 -04:00
Derrick Hammer 794ab2f792
*forgot to pass swarm to socket 2023-04-06 10:08:23 -04:00
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -75,7 +75,7 @@ export class SwarmClient extends Client {
async _listen() {
if (!this._connectionListener) {
this._connectionListener = this.connectModule("listenConnections", { swarm: this.swarm }, async (socketId) => {
const socket = this._sockets.get(socketId) ?? (await createSocket(socketId));
const socket = this._sockets.get(socketId) ?? (await createSocket(socketId, this));
socket.on("close", () => {
this._sockets.delete(socketId);
});

View File

@ -107,7 +107,7 @@ export class SwarmClient extends Client {
{ swarm: this.swarm },
async (socketId: any) => {
const socket =
this._sockets.get(socketId) ?? (await createSocket(socketId));
this._sockets.get(socketId) ?? (await createSocket(socketId, this));
socket.on("close", () => {
this._sockets.delete(socketId);