Compare commits

..

No commits in common. "4cd89acb1264e27214048cb31c8b8414ae8cb9f0" and "9c1bedc83e52cd01704c516f4488b64eb201de50" have entirely different histories.

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() { async _listen() {
if (!this._connectionListener) { if (!this._connectionListener) {
this._connectionListener = this.connectModule("listenConnections", { swarm: this.swarm }, async (socketId) => { this._connectionListener = this.connectModule("listenConnections", { swarm: this.swarm }, async (socketId) => {
const socket = this._sockets.get(socketId) ?? (await createSocket(socketId, this)); const socket = this._sockets.get(socketId) ?? (await createSocket(socketId));
socket.on("close", () => { socket.on("close", () => {
this._sockets.delete(socketId); this._sockets.delete(socketId);
}); });

View File

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