Fix crash on failed TLS connect
This commit is contained in:
parent
90a3bb8ba8
commit
5e6ac19d0f
|
@ -138,7 +138,7 @@ Client.prototype.connect = function(args) {
|
||||||
|
|
||||||
var stream = args.tls ? tls.connect(server) : net.connect(server);
|
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);
|
console.log("Client#connect():\n" + e);
|
||||||
stream.end();
|
stream.end();
|
||||||
var msg = new Msg({
|
var msg = new Msg({
|
||||||
|
|
Loading…
Reference in New Issue