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

Method setPingTimer

packages/rtm-api/src/KeepAlive.ts:147–157  ·  view source on GitHub ↗

* Sets the ping timer (including clearing any previous one).

()

Source from the content-addressed store, hash-verified

145 * Sets the ping timer (including clearing any previous one).
146 */
147 private setPingTimer(): void {
148 // if there's already an unacknowledged ping, we don't need to set up a timer for another to be sent
149 if (this.lastPing !== undefined) {
150 return;
151 }
152
153 this.logger.debug('setting ping timer');
154
155 this.clearPreviousPingTimer();
156 this.pingTimer = setTimeout(this.sendPing.bind(this), this.clientPingTimeout);
157 }
158
159 /**
160 * Sends a ping and manages the timer to wait for a pong.

Callers 1

startMethod · 0.95

Calls 2

debugMethod · 0.65

Tested by

no test coverage detected