|
@ -226,7 +226,7 @@ void Host::startPeerSession(Public const& _id, RLP const& _rlp, RLPXFrameIO* _io |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (peerSlotsAvailable(Ingress)) |
|
|
if (!peerSlotsAvailable(Ingress)) |
|
|
{ |
|
|
{ |
|
|
ps->disconnect(TooManyPeers); |
|
|
ps->disconnect(TooManyPeers); |
|
|
return; |
|
|
return; |
|
@ -580,10 +580,8 @@ void Host::run(boost::system::error_code const&) |
|
|
|
|
|
|
|
|
// todo: update peerSlotsAvailable()
|
|
|
// todo: update peerSlotsAvailable()
|
|
|
unsigned pendingCount = 0; |
|
|
unsigned pendingCount = 0; |
|
|
{ |
|
|
ETH_GUARDED(x_pendingNodeConns) |
|
|
Guard l(x_pendingNodeConns); |
|
|
|
|
|
pendingCount = m_pendingPeerConns.size(); |
|
|
pendingCount = m_pendingPeerConns.size(); |
|
|
} |
|
|
|
|
|
int openSlots = m_idealPeerCount - peerCount() - pendingCount; |
|
|
int openSlots = m_idealPeerCount - peerCount() - pendingCount; |
|
|
if (openSlots > 0) |
|
|
if (openSlots > 0) |
|
|
{ |
|
|
{ |
|
|