*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:
Derrick Hammer 2023-04-05 03:51:04 -04:00
parent 04528830cf
commit 369b1d19a4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -455,7 +455,9 @@ async function handleSyncProtomux(aq: ActiveQuery) {
}
});
mux._free = mux._free.filter((item: any) => item !== undefined);
socket.off("syncProtomux", sync);
socket.emit("syncProtomux");
socket.on("syncProtomux", sync);
mutex.release();
});