just a improvement on orphan session logging.

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle
2024-01-05 00:14:26 +07:00
parent d20cab9548
commit d0b8a6b3da

View File

@@ -235,7 +235,7 @@ function onClientDisconnect() {
const orphanSessNum = howManyOrphanSess(); const orphanSessNum = howManyOrphanSess();
const max = max_orphan_sess || 0; const max = max_orphan_sess || 0;
if (orphanSessNum > max) { if (orphanSessNum > max) {
console.log(process.pid, `There are ${orphanSessNum} orphan sessions. I will clear ${orphanSessNum - max} of orphan sessions.`); console.log(process.pid, `There are ${orphanSessNum} orphan sessions. I will clear ${orphanSessNum - max} orphan sessions.`);
clearOrphanSess(orphanSessNum - max); clearOrphanSess(orphanSessNum - max);
} }
} }