* Resets ping timeout. * * @private
()
| 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. |
no test coverage detected