summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-10 20:17:21 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-10 20:17:21 +1000
commitac89e43472408e4427916552d3d850504e9be9d9 (patch)
tree61bc1f53923cee9d8b5ef29f46cb2f974476fd33
parentfinally stop the database troubles (diff)
downloadserver-ac89e43472408e4427916552d3d850504e9be9d9.tar.xz
Bad 'fix' for socket not open?
-rw-r--r--gateway/src/util/Send.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/gateway/src/util/Send.ts b/gateway/src/util/Send.ts
index 2a4aa5ef..e1460846 100644
--- a/gateway/src/util/Send.ts
+++ b/gateway/src/util/Send.ts
@@ -19,8 +19,11 @@ export function Send(socket: WebSocket, data: Payload) {
 
 	return new Promise((res, rej) => {
 		if (socket.readyState !== 1) {
-			return rej("socket not open");
+			// return rej("socket not open");
+			socket.close();
+			return;
 		}
+
 		socket.send(buffer, (err: any) => {
 			if (err) return rej(err);
 			return res(null);