mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
handle server WSClose
This commit is contained in:
parent
3539de7c18
commit
ce4a642542
3 changed files with 33 additions and 7 deletions
|
@ -83,8 +83,9 @@ export class AdriftBareClient extends Client {
|
|||
onReadyState(WebSocket.OPEN);
|
||||
ws.dispatchEvent(new Event("open"));
|
||||
},
|
||||
() => {
|
||||
(code: number, reason: string, wasClean: boolean) => {
|
||||
onReadyState(WebSocket.CLOSED);
|
||||
ws.dispatchEvent(new CloseEvent("close", { code, reason, wasClean }));
|
||||
},
|
||||
(data) => {
|
||||
ws.dispatchEvent(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue