Fix crash on failed TLS connect

This commit is contained in:
Mattias Erming 2014-10-16 23:33:07 +02:00
parent 90a3bb8ba8
commit 5e6ac19d0f
1 changed files with 1 additions and 1 deletions

View File

@ -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({