mirror of
https://github.com/parnic/node-intellicenter.git
synced 2025-06-17 02:21:53 -05:00
Fix timeouts and errors not emitting "close"
This commit is contained in:
@ -76,11 +76,11 @@ export class Unit extends EventEmitter {
|
||||
return;
|
||||
}
|
||||
debugUnit("closing connection by request");
|
||||
this.emit("close");
|
||||
this.client.close();
|
||||
}
|
||||
socketCleanup = () => {
|
||||
debugUnit("socket cleanup");
|
||||
this.emit("close");
|
||||
this.client?.removeAllListeners();
|
||||
this.client = undefined;
|
||||
if (this.pingTimeout) {
|
||||
|
Reference in New Issue
Block a user