From 8c7e93b054f3383e6efa169f7ea7755b9c17ac9b Mon Sep 17 00:00:00 2001 From: pbca26 Date: Thu, 12 Oct 2017 16:05:34 +0300 Subject: [PATCH] AGT-65 possible workaround --- routes/shepherd.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/routes/shepherd.js b/routes/shepherd.js index 81dce7e..2b1f55e 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -61,7 +61,7 @@ let electrumServers = { serverList: [ '173.212.225.176:50050', '136.243.45.140:50050' - ] + ], }, mnz: { // !estimatefee address: '173.212.225.176', @@ -72,7 +72,7 @@ let electrumServers = { serverList: [ '173.212.225.176:50053', '136.243.45.140:50053' - ] + ], }, wlc: { // !estimatefee address: '173.212.225.176', @@ -83,7 +83,7 @@ let electrumServers = { serverList: [ '173.212.225.176:50052', '136.243.45.140:50052' - ] + ], }, jumblr: { // !estimatefee address: '173.212.225.176', @@ -3561,9 +3561,20 @@ shepherd.quitKomodod = function(timeout = 100) { clearInterval(coindExitInterval[key]); } + // workaround for AGT-65 + const _port = assetChainPorts[key]; + portscanner.checkPortStatus(_port, '127.0.0.1', function(error, status) { + // Status is 'open' if currently in use or 'closed' if available + if (status === 'closed') { + delete coindInstanceRegistry[key]; + clearInterval(coindExitInterval[key]); + } + }); + if (error !== null) { shepherd.log(`exec error: ${error}`); } + if (key === 'CHIPS') { setTimeout(function() { shepherd.killRogueProcess('chips-cli');