From 48b553768326da07bf47f57cd6f61dd68a7e8e15 Mon Sep 17 00:00:00 2001 From: Solomon English Date: Wed, 7 May 2014 02:18:03 -0700 Subject: [PATCH] adding an error handler for the tls socket connection --- lib/connection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/connection.js b/lib/connection.js index ca4b692da..94f97a8eb 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); + }); }); };