i can probably fix later but this is fine for now -CE

This commit is contained in:
CoolElectronics 2023-08-14 12:41:57 -04:00
parent d4010d8199
commit 619e1c999b
No known key found for this signature in database
GPG key ID: F63593D168636C50
3 changed files with 7 additions and 12 deletions

View file

@ -94,20 +94,15 @@ export class AdriftBareClient extends Client {
}
);
(ws as any).__defineGetter__("send", () => (data: any) => {
ws.send = (data: any) => {
send(data);
});
// uv wraps it and we don't want that
// i can probably fix later but this is fine for now -CE
(ws as any).__defineSetter__("send", () => {});
};
(ws as any).__defineGetter__(
"close",
() => (code?: number, reason?: string) => {
ws.close =
(code?: number, reason?: string) => {
close(code, reason);
onReadyState(WebSocket.CLOSING);
}
);
};
return ws;
}