mirror of
https://github.com/Yonle/bostr.git
synced 2025-10-04 18:02:29 +02:00
bouncer: updateSess() after client disconnect too.
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
@@ -120,7 +120,10 @@ module.exports = (ws, req) => {
|
|||||||
ws.on('error', console.error);
|
ws.on('error', console.error);
|
||||||
ws.on('close', _ => {
|
ws.on('close', _ => {
|
||||||
console.log(process.pid, "---", "Sock", ws.id, "has disconnected.", `(${howManyOrphanSess()+1} orphans)`);
|
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) {
|
for (i of ws.EOSETimeout) {
|
||||||
clearTimeout(i[1]);
|
clearTimeout(i[1]);
|
||||||
|
Reference in New Issue
Block a user