Browse Source

Merge pull request #1963 from subtly/affix

Don't abort connecting to required peer when it's not in node table.
cl-refactor
Gav Wood 10 years ago
parent
commit
244c3f4ec3
  1. 4
      libp2p/Host.cpp

4
libp2p/Host.cpp

@ -475,8 +475,10 @@ void Host::connect(std::shared_ptr<Peer> const& _p)
if (!!m_nodeTable && !m_nodeTable->haveNode(_p->id))
{
clog(NetWarn) << "Aborted connect. Node not in node table.";
// 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;
}

Loading…
Cancel
Save