Skip to content

Commit

Permalink
Just delete client on max retry, don't disconnect
Browse files Browse the repository at this point in the history
There's nothing to disconnect, throws an error
  • Loading branch information
lmtierney committed Sep 13, 2016
1 parent fc24f49 commit b8224ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Bot {
clearTimeout(client.timer);
}
} else if (client != null) {
this.ircClients[user.id].timer = setTimeout(() => {
client.timer = setTimeout(() => {
this.deleteClient(user, `Slack user ${user.name} went away.`);
}, this.ircTimeout * 1000);
}
Expand Down Expand Up @@ -320,7 +320,7 @@ class Bot {

client.on('abort', () => {
logger.error(`${user.name}: Maximum IRC retry count reached, exiting.`);
this.deleteClient(user, 'Abort.');
delete this.ircClients[user.id];
});

// Queued messages are sent once we know the client is in a channel.
Expand Down

0 comments on commit b8224ff

Please sign in to comment.