From 36108ca96210e3baea115facc5a5812b82948aa5 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 2 Nov 2012 23:54:22 +0000 Subject: [PATCH] Server: Correct IRC socket connect handler --- server/irc/connection.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/irc/connection.js b/server/irc/connection.js index c68637d..e7a4895 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -9,7 +9,13 @@ var IrcConnection = function (hostname, port, ssl, nick, user, pass) { events.EventEmitter.call(this); if (ssl) { - this.socket = tls.connect({host: hostname, port: port, rejectUnauthorized: global.config.reject_unauthorised_certificates}, connect_handler); + this.socket = tls.connect({ + host: hostname, + port: port, + rejectUnauthorized: global.config.reject_unauthorised_certificates + }, function () { + connect_handler.apply(that, arguments); + }); } else { this.socket = net.createConnection(port, hostname); this.socket.on('connect', function () { -- 2.25.1