From: Darren Date: Fri, 2 Nov 2012 23:54:22 +0000 (+0000) Subject: Server: Correct IRC socket connect handler X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=36108ca96210e3baea115facc5a5812b82948aa5;p=KiwiIRC.git Server: Correct IRC socket connect handler --- 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 () {