MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / onclose

Method onclose

frontend/app/store/ws.ts:129–144  ·  view source on GitHub ↗
(event: CloseEvent)

Source from the content-addressed store, hash-verified

127 }
128
129 onclose(event: CloseEvent) {
130 // console.log("close", event);
131 if (this.onOpenTimeoutId) {
132 clearTimeout(this.onOpenTimeoutId);
133 }
134 if (event.wasClean) {
135 dlog("connection closed");
136 } else {
137 dlog("connection error/disconnected");
138 }
139 if (this.open || this.opening) {
140 this.open = false;
141 this.opening = false;
142 this.reconnect();
143 }
144 }
145
146 onopen(e: Event) {
147 dlog("connection open");

Callers 1

connectNowMethod · 0.95

Calls 1

reconnectMethod · 0.95

Tested by

no test coverage detected