diff --git a/src/index.ts b/src/index.ts index 34ca55e..6005136 100644 --- a/src/index.ts +++ b/src/index.ts @@ -166,6 +166,7 @@ export class Socket extends Client { private syncMutex = new Mutex(); private swarm: SwarmClient; + private userData?: any = null; constructor(id: number, swarm: SwarmClient) { super(); @@ -195,6 +196,7 @@ export class Socket extends Client { } private async _initSync() { + this.userData = null; const mux = Protomux.from(this); this.swarm.emit("setup", this);