* Cleans up event listeners. * @private
()
| 343 | * @private |
| 344 | */ |
| 345 | private destroy(): void { |
| 346 | this.conn.removeListener("data", this.ondata); |
| 347 | this.conn.removeListener("error", this.onerror); |
| 348 | this.conn.removeListener("close", this.onclose); |
| 349 | // @ts-ignore |
| 350 | this.decoder.removeListener("decoded", this.ondecoded); |
| 351 | |
| 352 | if (this.connectTimeout) { |
| 353 | clearTimeout(this.connectTimeout); |
| 354 | this.connectTimeout = undefined; |
| 355 | } |
| 356 | } |
| 357 | } |
no outgoing calls
no test coverage detected