From fe29602f4ad440d2d1b2e94e3f2e39d2fd6ee911 Mon Sep 17 00:00:00 2001 From: zombieb Date: Tue, 15 Apr 2025 21:50:40 -0400 Subject: [PATCH] minor changes --- README.md | 3 +-- src/socket/socket.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0da89c0..e13d490 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ for Rec Room build 1063 (Timestamp: 637191339113673856, Version: 20200306) # Disclaimer Galvanic Corrosion and its contributors are **not** associated in **any** form with: -* RecNet -* Rec Room +* RecNet ("the RecNet platform") * Rec Room, Inc. * Exit Games Inc. * Against Gravity diff --git a/src/socket/socket.ts b/src/socket/socket.ts index 554d515..68a2291 100644 --- a/src/socket/socket.ts +++ b/src/socket/socket.ts @@ -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(); }