From 75c39b6bf5790d1e1a42b0467a0564d8be3dead4 Mon Sep 17 00:00:00 2001 From: Yonle Date: Wed, 3 Jan 2024 16:27:40 +0700 Subject: [PATCH] yeet Signed-off-by: Yonle --- bouncer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bouncer.js b/bouncer.js index a6016a5..1e0e5f3 100644 --- a/bouncer.js +++ b/bouncer.js @@ -47,7 +47,7 @@ module.exports = (ws, req) => { ws.send(JSON.stringify(["AUTH", authKey])); } - console.log(process.pid, `->- ${req.headers["x-forwarded-for"]?.split(",")[0] || req.socket.address()?.address} connected as ${ws.id}`); + console.log(process.pid, `->- ${req.headers["x-forwarded-for"]?.split(",")[0] || req.socket.address()?.address} connected as ${ws.id} ${orphan ? "(orphan reused)" : ""}`); ws.on("message", data => { try { data = JSON.parse(data); @@ -215,7 +215,7 @@ function onClientDisconnect() { const orphanSessNum = howManyOrphanSess(); const max = max_orphan_sess || 0; if (orphanSessNum > max) { - if (log_about_relays) console.log(process.pid, `There are ${orphanSessNum} of orphan session. I will clear ${orphanSessNum - max} of orphan sessions.`); + console.log(process.pid, `There are ${orphanSessNum} of orphan session. I will clear ${orphanSessNum - max} of orphan sessions.`); clearOrphanSess(orphanSessNum - max); } }