From c8dfe77fc866155166c09886c0ef084e9f846325 Mon Sep 17 00:00:00 2001 From: Yonle Date: Sat, 11 May 2024 13:10:23 +0700 Subject: [PATCH] bouncer: forgot to tell the ident that worker should delete Signed-off-by: Yonle --- bouncer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bouncer.js b/bouncer.js index 5bcfff1..c2ed6a0 100644 --- a/bouncer.js +++ b/bouncer.js @@ -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 }); }