Browse Source

required peers are not added to the node table

cl-refactor
Vlad Gluhovsky 10 years ago
parent
commit
b7c28a09aa
  1. 10
      libp2p/Host.cpp

10
libp2p/Host.cpp

@ -530,14 +530,8 @@ void Host::connect(std::shared_ptr<Peer> const& _p)
return; return;
} }
if (!!m_nodeTable && !m_nodeTable->haveNode(_p->id)) if (!!m_nodeTable && !m_nodeTable->haveNode(_p->id) && !_p->required)
{ return;
// connect was attempted, so try again by adding to node table
m_nodeTable->addNode(*_p.get());
// abort unless peer is required
if (!_p->required)
return;
}
// prevent concurrently connecting to a node // prevent concurrently connecting to a node
Peer *nptr = _p.get(); Peer *nptr = _p.get();

Loading…
Cancel
Save