*Add protomux userData field as null, otherwise it does not get set

This commit is contained in:
Derrick Hammer 2023-04-06 10:17:16 -04:00
parent 4cd89acb12
commit 382ce99ada
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -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);