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