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:
Stephen Buttolph 2020-05-18 11:56:22 -04:00 committed by GitHub
commit 6777212c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)