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.
This commit is contained in:
parent
595b386afc
commit
f13493edb2
11 changed files with 147 additions and 110 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue