mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
bouncer: updateSess() after client disconnect too.
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
8b955f121f
commit
06ac5ed15c
@ -120,7 +120,10 @@ module.exports = (ws, req) => {
|
||||
ws.on('error', console.error);
|
||||
ws.on('close', _ => {
|
||||
console.log(process.pid, "---", "Sock", ws.id, "has disconnected.", `(${howManyOrphanSess()+1} orphans)`);
|
||||
if (csess.has(ws.id)) csess.set(ws.id, null); // set as orphan.
|
||||
if (csess.has(ws.id)) {
|
||||
csess.set(ws.id, null); // set as orphan.
|
||||
updateSess(ws.id); // change relays relay.client object
|
||||
}
|
||||
|
||||
for (i of ws.EOSETimeout) {
|
||||
clearTimeout(i[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user