diff --git a/lib/connection.js b/lib/connection.js index ca4b692..94f97a8 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -89,6 +89,10 @@ Connection.prototype.connect = function(port, host) { }); self.attachListeners(self.stream); self.emit('sslconnect'); + + self.stream.on('error', function(error){ + self.emit('error', error); + }); }); };