Enable auto reconnection
This commit is contained in:
parent
fca941e962
commit
e3a1bf2f87
@ -211,7 +211,7 @@ Client.prototype.connect = function(args) {
|
|||||||
tls: network.tls,
|
tls: network.tls,
|
||||||
localAddress: config.bind,
|
localAddress: config.bind,
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
auto_reconnect: false, // TODO: Enable auto reconnection
|
auto_reconnect: true,
|
||||||
webirc: webirc,
|
webirc: webirc,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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({
|
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() {
|
irc.on("reconnecting", function() {
|
||||||
network.channels[0].pushMessage(client, new Msg({
|
network.channels[0].pushMessage(client, new Msg({
|
||||||
text: "Reconnecting..."
|
text: "Disconnected from the network. Reconnecting..."
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user