* Cleans any timer used internally and sets the client as closed.
()
| 390 | * Cleans any timer used internally and sets the client as closed. |
| 391 | */ |
| 392 | shutdown() { |
| 393 | if (!this._enabled) { |
| 394 | return; |
| 395 | } |
| 396 | |
| 397 | this._closed = true; |
| 398 | |
| 399 | if (this._firstTimeout !== null) { |
| 400 | clearTimeout(this._firstTimeout); |
| 401 | } |
| 402 | |
| 403 | if (this._recurrentTimeout !== null) { |
| 404 | clearInterval(this._recurrentTimeout); |
| 405 | } |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | module.exports = InsightsClient; |