MCPcopy
hub / github.com/socketio/socket.io / resetPingTimeout

Method resetPingTimeout

packages/engine.io/lib/socket.ts:228–239  ·  view source on GitHub ↗

* Resets ping timeout. * * @private

()

Source from the content-addressed store, hash-verified

226 * @private
227 */
228 private resetPingTimeout() {
229 clearTimeout(this.pingTimeoutTimer);
230 this.pingTimeoutTimer = setTimeout(
231 () => {
232 if (this.readyState === "closed") return;
233 this.onClose("ping timeout");
234 },
235 this.protocol === 3
236 ? this.server.opts.pingInterval + this.server.opts.pingTimeout
237 : this.server.opts.pingTimeout,
238 );
239 }
240
241 /**
242 * Attaches handlers for the given transport.

Callers 2

onOpenMethod · 0.95
schedulePingMethod · 0.95

Calls 1

onCloseMethod · 0.95

Tested by

no test coverage detected