Enable auto reconnection

This commit is contained in:
Pavel Djundik 2016-04-13 10:10:44 +03:00
parent fca941e962
commit e3a1bf2f87
2 changed files with 4 additions and 4 deletions

View File

@ -211,7 +211,7 @@ Client.prototype.connect = function(args) {
tls: network.tls,
localAddress: config.bind,
rejectUnauthorized: false,
auto_reconnect: false, // TODO: Enable auto reconnection
auto_reconnect: true,
webirc: webirc,
});

View File

@ -19,9 +19,9 @@ module.exports = function(irc, network) {
}));
});
irc.on("socket close", function() {
irc.on("close", function() {
network.channels[0].pushMessage(client, new Msg({
text: "Disconnected from the network."
text: "Disconnected from the network, and will not reconnect."
}));
});
@ -35,7 +35,7 @@ module.exports = function(irc, network) {
irc.on("reconnecting", function() {
network.channels[0].pushMessage(client, new Msg({
text: "Reconnecting..."
text: "Disconnected from the network. Reconnecting..."
}));
});