// We try to reconnect only with peers marked as DOWN
// We try to reconnect only with peers marked as DOWN
...
@@ -244,6 +236,8 @@ function PeeringService(server, pair, dal) {
...
@@ -244,6 +236,8 @@ function PeeringService(server, pair, dal) {
// The peering changed
// The peering changed
yieldQ.nfcall(that.submit,peering);
yieldQ.nfcall(that.submit,peering);
}
}
// Do not need to display when next check will occur: the node is now UP
shouldDisplayDelays=false;
}catch (err){
}catch (err){
// Error: we set the peer as DOWN
// Error: we set the peer as DOWN
logger.warn("Peer record %s: %s",p.pubkey,err.code||err.message||err);
logger.warn("Peer record %s: %s",p.pubkey,err.code||err.message||err);
...
@@ -252,7 +246,7 @@ function PeeringService(server, pair, dal) {
...
@@ -252,7 +246,7 @@ function PeeringService(server, pair, dal) {
}
}
}
}
if (shouldDisplayDelays){
if (shouldDisplayDelays){
logger.info('Will check that node %s (%s:%s) is UP in %s min...',p.pubkey.substr(0,6),p.getHostPreferDNS(),p.getPort(),(waitRemaining/60).toFixed(0));
logger.info('Will check that node %s (%s:%s) is UP in %s min...',p.pubkey.substr(0,6),p.getHostPreferDNS(),p.getPort(),(nextWaitRemaining/60).toFixed(0));
}
}
}
}
}
}
...
@@ -261,6 +255,32 @@ function PeeringService(server, pair, dal) {
...
@@ -261,6 +255,32 @@ function PeeringService(server, pair, dal) {