mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
fmt
This commit is contained in:
parent
d996adbd2e
commit
a43cf04780
1 changed files with 5 additions and 5 deletions
|
@ -71,6 +71,7 @@ export class AdriftBareClient extends Client {
|
||||||
let initalCloseHappened = false;
|
let initalCloseHappened = false;
|
||||||
ws.addEventListener("close", (e) => {
|
ws.addEventListener("close", (e) => {
|
||||||
if (!initalCloseHappened) {
|
if (!initalCloseHappened) {
|
||||||
|
onReadyState(WebSocket.CONNECTING);
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
initalCloseHappened = true;
|
initalCloseHappened = true;
|
||||||
}
|
}
|
||||||
|
@ -98,11 +99,10 @@ export class AdriftBareClient extends Client {
|
||||||
send(data);
|
send(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
ws.close =
|
ws.close = (code?: number, reason?: string) => {
|
||||||
(code?: number, reason?: string) => {
|
close(code, reason);
|
||||||
close(code, reason);
|
onReadyState(WebSocket.CLOSING);
|
||||||
onReadyState(WebSocket.CLOSING);
|
};
|
||||||
};
|
|
||||||
|
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue