summaryrefslogtreecommitdiff
path: root/node/Topology.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-31 22:23:55 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-31 22:23:55 -0700
commitf13493edb2aae228ddbe70cc2f0609c541faf2d7 (patch)
treecb1a6845ec82e2ea361ce15e88440a249992091c /node/Topology.cpp
parent595b386afcd4e4eca0cf379cd14689c1db8ee647 (diff)
downloadinfinitytier-f13493edb2aae228ddbe70cc2f0609c541faf2d7.tar.gz
infinitytier-f13493edb2aae228ddbe70cc2f0609c541faf2d7.zip
Oops... turns out we need to differentiate incoming from outgoing TCP and indeed learn incoming TCP paths. Otherwise the recipient of a TCP connection does not know to reply via TCP! Heh.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r--node/Topology.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp
index 6390a338..d4df3ce6 100644
--- a/node/Topology.cpp
+++ b/node/Topology.cpp
@@ -65,7 +65,7 @@ void Topology::setSupernodes(const std::map< Identity,std::vector< std::pair<Ine
if (!p)
p = addPeer(SharedPtr<Peer>(new Peer(_r->identity,i->first)));
for(std::vector< std::pair<InetAddress,bool> >::const_iterator j(i->second.begin());j!=i->second.end();++j)
- p->addPath(Path(j->first,j->second,true));
+ p->addPath(Path(j->first,(j->second) ? Path::PATH_TYPE_TCP_OUT : Path::PATH_TYPE_UDP,true));
p->use(now);
_supernodePeers.push_back(p);
}