MCPcopy
hub / github.com/tsrpc/tsrpc / clean

Method clean

src/server/ws/WsConnection.ts:67–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 clean() {
68 if (this.options.ws && this.options.ws.readyState === WebSocket.OPEN) {
69 this.options.ws.close()
70 }
71 this.options.ws.onopen = this.options.ws.onclose = this.options.ws.onmessage = this.options.ws.onerror = undefined as any;
72
73 super.clean();
74 this.logger.destroy();
75 this.ip = this.session = this.logger = undefined as any;
76 }
77
78 destroy() {
79 WsConnection.pool.put(this);

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected