Stop the service entirely.
()
| 70 | |
| 71 | /** Stop the service entirely. */ |
| 72 | stop() { |
| 73 | this._clearTimers(); |
| 74 | if (this._ws) { |
| 75 | this._ws.close(1000, 'client stop'); |
| 76 | this._ws = null; |
| 77 | } |
| 78 | this._setState('disconnected'); |
| 79 | } |
| 80 | |
| 81 | /** Register a callback for sensing data updates. Returns unsubscribe fn. */ |
| 82 | onData(callback) { |
no test coverage detected