mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-26 09:31:43 +01:00
yeet
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
bcc5c46979
commit
75c39b6bf5
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user