[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()
jenkins-bot has submitted this change and it was merged. Change subject: Add setInterval to ssh close for startRelay() .. Add setInterval to ssh close for startRelay() Change-Id: I5cc2067d90e270fe667227895caeea499bce5323 --- M src/relay.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/src/relay.js b/src/relay.js index 0cdb053..c779788 100644 --- a/src/relay.js +++ b/src/relay.js @@ -10,6 +10,7 @@ yaml = require('js-yaml'), logging = require('winston'), ssh2 = require('ssh2'), +handle, sshConn = null, // Sane? defaults config_defaults = { @@ -52,13 +53,15 @@ console.log('Client error: ' + err); }).on('close', function() { console.log('Client disconnected'); -startRelay(); +handle = setInterval(startRelay, 1); +console.log('Client re-connected'); }).connect({ host: host, port: port, username: username, privateKey: require('fs').readFileSync(keypath), }); +clearInterval(handle); } var allChannels = _.keys(config.channels); -- To view, visit https://gerrit.wikimedia.org/r/319985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5cc2067d90e270fe667227895caeea499bce5323 Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/319985 Change subject: Add setInterval to ssh close for startRelay() .. Add setInterval to ssh close for startRelay() Change-Id: I5cc2067d90e270fe667227895caeea499bce5323 --- M src/relay.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/85/319985/1 diff --git a/src/relay.js b/src/relay.js index 0cdb053..3d135ef 100644 --- a/src/relay.js +++ b/src/relay.js @@ -52,7 +52,8 @@ console.log('Client error: ' + err); }).on('close', function() { console.log('Client disconnected'); -startRelay(); +setInterval(startRelay, 1); +console.log('Client re-connected'); }).connect({ host: host, port: port, -- To view, visit https://gerrit.wikimedia.org/r/319985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5cc2067d90e270fe667227895caeea499bce5323 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()
jenkins-bot has submitted this change and it was merged. Change subject: Add setInterval to ssh close for startRelay() .. Add setInterval to ssh close for startRelay() This prevents it from retrying ssh so quickly. lets try this function every 10 seconds instead of instantly which could cause other problems. Change-Id: Ie5f2904137ff3b59f851999334b79391177fd661 --- M src/relay.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/src/relay.js b/src/relay.js index 0cdb053..3d135ef 100644 --- a/src/relay.js +++ b/src/relay.js @@ -52,7 +52,8 @@ console.log('Client error: ' + err); }).on('close', function() { console.log('Client disconnected'); -startRelay(); +setInterval(startRelay, 1); +console.log('Client re-connected'); }).connect({ host: host, port: port, -- To view, visit https://gerrit.wikimedia.org/r/319910 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5f2904137ff3b59f851999334b79391177fd661 Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/319910 Change subject: Add setInterval to ssh close for startRelay() .. Add setInterval to ssh close for startRelay() This prevents it from retrying ssh so quickly. lets try this function every 10 seconds instead of instantly which could cause other problems. Change-Id: Ie5f2904137ff3b59f851999334b79391177fd661 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/10/319910/1 -- To view, visit https://gerrit.wikimedia.org/r/319910 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5f2904137ff3b59f851999334b79391177fd661 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits