()
| 103 | let pingTimeout = null; |
| 104 | |
| 105 | function sendPing() { |
| 106 | if (ws.readyState === ws.OPEN) { |
| 107 | ws.ping(err => _logError(err, 'failed to send a ping', 'sendPing')); |
| 108 | } |
| 109 | pingTimeout = setTimeout(() => ws.terminate(), PING_INTERVAL_MS); |
| 110 | } |
| 111 | |
| 112 | function initiatePing() { |
| 113 | clearTimeout(pingTimeout); |
nothing calls this directly
no test coverage detected