()
| 487 | }); |
| 488 | |
| 489 | destroySocket() { |
| 490 | // Clear auxiliar object |
| 491 | |
| 492 | this.socket.aux = null as any; |
| 493 | |
| 494 | this.socket.terminate(); |
| 495 | |
| 496 | // Unsubscribe from user notifications |
| 497 | |
| 498 | void getSub().unsubscribe(`user-notification:${this.userId}`); |
| 499 | |
| 500 | getSub().off('message', this._handleUserNotification); |
| 501 | |
| 502 | // Remove update listeners |
| 503 | |
| 504 | for (const updateListener of this._listeners.values()) { |
| 505 | void dataAbstraction().removeUpdateListener(updateListener); |
| 506 | } |
| 507 | } |
| 508 | } |
no test coverage detected