From bd425a9e5ae5650bd4f134388e4530d5f6c7dba4 Mon Sep 17 00:00:00 2001 From: Yonle Date: Sat, 11 May 2024 11:01:53 +0700 Subject: [PATCH] bouncer: just poke ready function if session is already prepared Signed-off-by: Yonle --- bouncer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bouncer.js b/bouncer.js index 4039b24..cdc455b 100644 --- a/bouncer.js +++ b/bouncer.js @@ -158,8 +158,8 @@ function handleWorker(msg) { switch (msg.type) { case "sessreg": { if (!idents.hasOwnProperty(msg.ident)) return _destroy(msg.id); - if (idents[msg.ident].id === msg.id) return ws.onready(); // if existing is the same as the current one, just poke ready. const ws = idents[msg.ident]; + if (ws.id === msg.id) return ws.onready(); // if existing is the same as the current one, just poke ready. ws.id = msg.id; ws.onready(); csess[msg.id] = ws;