Fix connection issue

This commit is contained in:
Bryan Ashby 2016-06-27 23:01:57 -06:00
parent e82ec724e1
commit dc8a06331b
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,7 @@ function ErcClientModule(options) {
self.viewControllers.menu.switchFocus(MciViewIds.InputArea); 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 = net.createConnection(connectOpts.port, connectOpts.host);
self.chatConnection.on('data', data => { self.chatConnection.on('data', data => {
@ -112,6 +113,7 @@ function ErcClientModule(options) {
self.chatConnection.once('error', err => { self.chatConnection.once('error', err => {
self.client.log.info(`ERC connection error: ${err.message}`); self.client.log.info(`ERC connection error: ${err.message}`);
return callback(new Error('Failed connecting to ERC server!'));
}); });
} }
], ],