summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-04-30 21:51:05 -0700
committerGrant Limberg <glimberg@gmail.com>2015-04-30 21:51:05 -0700
commitb242886c339f013b6ad10caa3bc5d5be10628da3 (patch)
tree6e14963f2bd30313ff990c1f3e65415d2e4c6b07 /node/Peer.cpp
parent0a15eae00f7360930dad1fcfb25f02c15c930710 (diff)
parent9279bac385d842d7f031306bc9a68bbb737bd3ce (diff)
downloadinfinitytier-b242886c339f013b6ad10caa3bc5d5be10628da3.tar.gz
infinitytier-b242886c339f013b6ad10caa3bc5d5be10628da3.zip
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 526e3a28..7c0868eb 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -261,7 +261,7 @@ void Peer::clearPaths(bool fixedToo)
}
}
-void Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope scope,uint64_t now)
+bool Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope scope,uint64_t now)
{
unsigned int np = _numPaths;
unsigned int x = 0;
@@ -278,13 +278,7 @@ void Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope sc
++x;
}
_numPaths = y;
-
- if ((y < np)&&(alive(now))) {
- // Try to re-establish direct connectivity to this peer if it's alive
- // and we have forgotten paths to it.
- Packet outp(_id.address(),RR->identity.address(),Packet::VERB_NOP);
- RR->sw->send(outp,true);
- }
+ return (y < np);
}
void Peer::getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6,unsigned int maxDesperation) const