fix(socket): use socket.writable to check if its safe to send a message

This commit is contained in:
MARCROCK22 2024-08-25 21:40:32 +00:00
parent 9b2393f001
commit 3fb57ccc79

View File

@ -177,6 +177,8 @@ export class SeyfertWebSocket {
}
private _write(buffer: Buffer, opcode: number) {
if (!this.socket?.writable)
return;
const length = buffer.length;
let frame;
// Kinda same logic as above, but client-side