*remove the current listeners sync function from the syncProtomux before emitting to not create an infinite loop, and add back after
This commit is contained in:
parent
04528830cf
commit
369b1d19a4
|
@ -455,7 +455,9 @@ async function handleSyncProtomux(aq: ActiveQuery) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mux._free = mux._free.filter((item: any) => item !== undefined);
|
mux._free = mux._free.filter((item: any) => item !== undefined);
|
||||||
|
socket.off("syncProtomux", sync);
|
||||||
socket.emit("syncProtomux");
|
socket.emit("syncProtomux");
|
||||||
|
socket.on("syncProtomux", sync);
|
||||||
|
|
||||||
mutex.release();
|
mutex.release();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue