minor changes
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 1m38s

This commit is contained in:
2025-04-15 21:50:40 -04:00
parent 32dd61f49c
commit fe29602f4a
2 changed files with 4 additions and 5 deletions

View File

@@ -143,14 +143,14 @@ export class SignalRSocketHandler {
}
});
this.#socket.addEventListener('close', this.destroy(this));
this.#socket.addEventListener('close', this.destroy(this, true));
}
destroy(sock: SignalRSocketHandler) {
destroy(sock: SignalRSocketHandler, internal: boolean | undefined = false) {
return () => {
clearInterval(sock.#PeriodicalId);
sock.sendRaw({ type: 7, error: "Socket closed" });
sock.#socket.close();
if (!internal) sock.#socket.close();
sock.#log.i(`Closed socket`);
sock.#profile.clearSocketHandler();
}