From 382ce99ada05dcf2dfdbf1044dcba36ca88de428 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 6 Apr 2023 10:17:16 -0400 Subject: [PATCH] *Add protomux userData field as null, otherwise it does not get set --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) 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);