From f13493edb2aae228ddbe70cc2f0609c541faf2d7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 31 Mar 2014 22:23:55 -0700 Subject: 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. --- node/Topology.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node/Topology.cpp') 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(new Peer(_r->identity,i->first))); for(std::vector< std::pair >::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); } -- cgit v1.2.3