diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-31 22:23:55 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-31 22:23:55 -0700 |
| commit | f13493edb2aae228ddbe70cc2f0609c541faf2d7 (patch) | |
| tree | cb1a6845ec82e2ea361ce15e88440a249992091c /node/Topology.cpp | |
| parent | 595b386afcd4e4eca0cf379cd14689c1db8ee647 (diff) | |
| download | infinitytier-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.cpp | 2 |
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); } |
