From dc8a06331bc52707bef3245b330000f1cd9eb1ab Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 27 Jun 2016 23:01:57 -0600 Subject: [PATCH] Fix connection issue --- mods/erc_client.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/erc_client.js b/mods/erc_client.js index 3c759159..cb30f2d0 100644 --- a/mods/erc_client.js +++ b/mods/erc_client.js @@ -67,6 +67,7 @@ function ErcClientModule(options) { self.viewControllers.menu.switchFocus(MciViewIds.InputArea); + // :TODO: Track actual client->enig connection for optional prevMenu @ final CB self.chatConnection = net.createConnection(connectOpts.port, connectOpts.host); self.chatConnection.on('data', data => { @@ -112,6 +113,7 @@ function ErcClientModule(options) { self.chatConnection.once('error', err => { self.client.log.info(`ERC connection error: ${err.message}`); + return callback(new Error('Failed connecting to ERC server!')); }); } ],