summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-28 22:49:01 +0000
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-28 22:49:01 +0000
commit7b7ab823b0847d9bd4437a8a86b5bdf48590b79d (patch)
treee16c0f8291e9a73d3a9097269303165385a066dc /node
parent0410fd4824fd898fab7815c6ef67b8e39bb6d2b9 (diff)
downloadinfinitytier-7b7ab823b0847d9bd4437a8a86b5bdf48590b79d.tar.gz
infinitytier-7b7ab823b0847d9bd4437a8a86b5bdf48590b79d.zip
Fix getPeer(self) bug if I am the controller.
Diffstat (limited to 'node')
-rw-r--r--node/Multicaster.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp
index 1dfa67dd..e1d4567a 100644
--- a/node/Multicaster.cpp
+++ b/node/Multicaster.cpp
@@ -228,7 +228,9 @@ void Multicaster::send(
gs.lastExplicitGather = now;
SharedPtr<Peer> explicitGatherPeers[2];
explicitGatherPeers[0] = RR->topology->getBestRoot();
- explicitGatherPeers[1] = RR->topology->getPeer(Network::controllerFor(nwid));
+ const Address nwidc(Network::controllerFor(nwid));
+ if (nwidc != RR->identity.address())
+ explicitGatherPeers[1] = RR->topology->getPeer(nwidc);
for(unsigned int k=0;k<2;++k) {
const SharedPtr<Peer> &p = explicitGatherPeers[k];
if (!p)