mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
i can probably fix later but this is fine for now -CE
This commit is contained in:
parent
d4010d8199
commit
619e1c999b
3 changed files with 7 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue