mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix IRC node (once again)
refactoring created incorrect object references - which weren't picked up. (sorry) - Addresses Issue 439
This commit is contained in:
parent
d4a21be666
commit
7802939bb0
@ -65,14 +65,14 @@ module.exports = function(RED) {
|
||||
node.recon = setInterval( function() {
|
||||
//console.log("CHK ",(Date.now()-node.serverConfig.lastseen)/1000);
|
||||
if ((Date.now()-node.serverConfig.lastseen) > 300000) { // if more than 5 mins since last seen
|
||||
node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
|
||||
node.serverConfig.ircclient.send.apply(node.serverConfig.ircclient,["TIME"]); // request time to check link
|
||||
}
|
||||
if ((Date.now()-node.serverConfig.lastseen) > 400000) { // If more than 6.5 mins
|
||||
node.serverConfig.ircclient.disconnect();
|
||||
node.serverConfig.ircclient.connect();
|
||||
node.log("reconnect"); // then retry
|
||||
}
|
||||
node.ircclient.send.apply(node.ircclient,["TIME"]); // request time to check link
|
||||
node.serverConfig.ircclient.send.apply(node.serverConfig.ircclient,["TIME"]); // request time to check link
|
||||
}, 60000); // check every 1 min
|
||||
}
|
||||
else { node.status({text:""}); }
|
||||
|
Loading…
Reference in New Issue
Block a user