diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-10 20:17:21 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-10 20:17:21 +1000 |
commit | ac89e43472408e4427916552d3d850504e9be9d9 (patch) | |
tree | 61bc1f53923cee9d8b5ef29f46cb2f974476fd33 | |
parent | finally stop the database troubles (diff) | |
download | server-ac89e43472408e4427916552d3d850504e9be9d9.tar.xz |
Bad 'fix' for socket not open?
-rw-r--r-- | gateway/src/util/Send.ts | 5 |
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); |