MCPcopy
hub / github.com/slackapi/node-slack-sdk / teardownWebsocket

Method teardownWebsocket

packages/rtm-api/src/RTMClient.ts:578–586  ·  view source on GitHub ↗

* Tear down method for the client's websocket instance. This method undoes the work in setupWebsocket(url).

()

Source from the content-addressed store, hash-verified

576 * Tear down method for the client's websocket instance. This method undoes the work in setupWebsocket(url).
577 */
578 private teardownWebsocket(): void {
579 if (this.websocket !== undefined) {
580 this.websocket.removeAllListeners('open');
581 this.websocket.removeAllListeners('close');
582 this.websocket.removeAllListeners('error');
583 this.websocket.removeAllListeners('message');
584 this.websocket = undefined;
585 }
586 }
587
588 /**
589 * `onmessage` handler for the client's websocket. This will parse the payload and dispatch the relevant events for

Callers 1

RTMClientClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected