mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
bouncer: rework relay abandon func
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
b4eab0d2f4
commit
f00e449036
@ -327,7 +327,7 @@ function newConn(addr, client, reconn_t = 0) {
|
||||
if (client.readyState !== 1) return;
|
||||
client.relays.delete(relay);
|
||||
if (res.statusCode >= 500) return relay.emit("close", null);
|
||||
delete relays[relays.indexOf(addr)];
|
||||
relays = relays.filter(_ => !relay.url.startsWith(_));
|
||||
console.log(process.pid, "-!-", `${relay.url} give status code ${res.statusCode}. Not (re)connect with new session again.`);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user