Skip to content

Commit 48b5537

Browse files
committed
adding an error handler for the tls socket connection
1 parent 220c5fd commit 48b5537

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/connection.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ Connection.prototype.connect = function(port, host) {
8989
});
9090
self.attachListeners(self.stream);
9191
self.emit('sslconnect');
92+
93+
self.stream.on('error', function(error){
94+
self.emit('error', error);
95+
});
9296
});
9397
};
9498

0 commit comments

Comments
 (0)