From 5e6ac19d0f8b67144af9289813d3f5b9774e28dd Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Thu, 16 Oct 2014 23:33:07 +0200 Subject: [PATCH] Fix crash on failed TLS connect --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index 3a9cbdf3..853e0e16 100644 --- a/src/client.js +++ b/src/client.js @@ -138,7 +138,7 @@ Client.prototype.connect = function(args) { var stream = args.tls ? tls.connect(server) : net.connect(server); - (stream.socket || stream).on("error", function(e) { + stream.on("error", function(e) { console.log("Client#connect():\n" + e); stream.end(); var msg = new Msg({