handle CLOSED message properly.

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-02-26 19:11:32 +07:00
parent 399bd18d55
commit 6b4527164d

View File

@ -299,14 +299,16 @@ function newConn(addr, client, reconn_t = 0) {
break;
case "NOTICE":
case "CLOSED":
if (typeof(data[1]) !== "string") return;
if (data[1].startsWith("rate-limited")) relay.ratelimit = Date.now();
break;
case "CLOSED":
case "OK":
if (typeof(data[2]) !== "string") return;
if (data[2].startsWith("rate-limited")) relay.ratelimit = Date.now();
break;
}
});