From 6ba3a90fcaf102d9d255008aa3de31e18501f502 Mon Sep 17 00:00:00 2001 From: Darren Date: Wed, 27 Aug 2014 20:45:07 +0100 Subject: [PATCH] Triggering connection 'close' event fix --- server/irc/connection.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/irc/connection.js b/server/irc/connection.js index da5f173..6267725 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -315,7 +315,10 @@ IrcConnection.prototype.connect = function () { // Close the whole socket down that.disposeSocket(); - if (global.config.ircd_reconnect) { + if (!global.config.ircd_reconnect) { + that.emit('close', had_error); + + } else { // If trying to reconnect, continue with it if (that.reconnect_attempts && that.reconnect_attempts < 3) { should_reconnect = true; -- 2.25.1