bouncer: forgot to tell the ident that worker should delete

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-05-11 13:10:23 +07:00
parent 32c6a93370
commit c8dfe77fc8

View File

@ -150,7 +150,7 @@ function handleConnection(ws, req) {
console.log(process.pid, "---", `${ws.ip} disconnected`);
if (!sessStarted) return;
_destroy(ws.id);
_destroy(ws.id, ws.ident);
delete csess[ws.id];
});
}
@ -217,10 +217,11 @@ function _auth(id, pubkey) {
});
}
function _destroy(id) {
function _destroy(id, ident) {
worker.postMessage({
type: "destroy",
id
id,
ident
});
}