MCPcopy
hub / github.com/retspen/webvirtcloud / close

Function close

static/js/novnc/websock.js:364–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

362}
363
364function close() {
365 if (websocket) {
366 if ((websocket.readyState === WebSocket.OPEN) ||
367 (websocket.readyState === WebSocket.CONNECTING)) {
368 Util.Info("Closing WebSocket connection");
369 websocket.close();
370 }
371 websocket.onmessage = function (e) { return; };
372 }
373}
374
375// Override internal functions for testing
376// Takes a send function, returns reference to recv function

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected