mirror of
https://github.com/spacebarchat/server.git
synced 2026-12-01 03:18:04 +00:00
Revert "Remove unnessesary async and close on error in gateway"
This reverts commit e55ad7ee3d.
This commit is contained in:
1 parent
a6a2ba22fe
commit
cecd4adab0
2 files changed
+2
-2
No files matched your search
@@ -41,7 +41,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
|
||||
return await OPCodeHandler.call(this, data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
// if (!this.CLOSED && this.CLOSING)
|
||||
if (!this.CLOSED && this.CLOSING)
|
||||
return this.close(CLOSECODES.Unknown_error);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ try {
|
||||
}
|
||||
import { Payload, WebSocket } from "@fosscord/gateway";
|
||||
|
||||
export function Send(socket: WebSocket, data: Payload) {
|
||||
export async function Send(socket: WebSocket, data: Payload) {
|
||||
let buffer: Buffer | string;
|
||||
if (socket.encoding === "etf") buffer = erlpack.pack(data);
|
||||
// TODO: encode circular object
|
||||
|
||||
Reference in new issue
Block a user