mirror of https://github.com/poanetwork/gecko.git
Merge pull request #170 from StephenButtolph/staking-disabled-connections
If staking is disabled, always attempt to reconnect to a peer
This commit is contained in:
commit
6777212c74
|
@ -515,7 +515,7 @@ func (nm *Handshake) disconnectedFromPeer(peer salticidae.PeerID) {
|
|||
nm.connections.Remove(peer, cert)
|
||||
nm.numPeers.Set(float64(nm.connections.Len()))
|
||||
|
||||
if nm.vdrs.Contains(cert) {
|
||||
if !nm.enableStaking || nm.vdrs.Contains(cert) {
|
||||
nm.reconnectTimeout.Put(peerID, func() {
|
||||
nm.pending.Remove(peer, cert)
|
||||
nm.connections.Remove(peer, cert)
|
||||
|
|
Loading…
Reference in New Issue