emit error on socket error

This commit is contained in:
Petr Severa 2025-11-18 13:09:41 +01:00 committed by GitHub
parent f0342def33
commit 82703bc9f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,6 +28,7 @@ class TCPConnection extends Connection {
// handle errors
this.socket.on('error', (error) => {
console.error('Connection Error', error);
this.emit("error", error);
});
// handle socket close