Revert "Remove unnessesary async and close on error in gateway"
This reverts commit e55ad7ee3d.
This commit is contained in:
@@ -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