()
| 145 | } |
| 146 | |
| 147 | private ensureConnection() { |
| 148 | if (this.keepOpen) { |
| 149 | if (this.url && (!this.client.socket || this.client.socket.readyState === this.socketCon.CLOSED)) { |
| 150 | console.log('Closed, try again'); |
| 151 | this.reconnect(); |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // API |
| 157 |