fix: consider message failures and timeouts to also be uncooperative

This commit is contained in:
Cassandra Heart 2023-10-05 16:19:06 -05:00
parent b4ad1aed18
commit 520d6562f9
No known key found for this signature in database
GPG Key ID: 6352152859385958

View File

@ -930,6 +930,10 @@ func (e *CeremonyDataClockConsensusEngine) collect(
"error while retrieving sync",
zap.Error(err),
)
e.peerMapMx.Lock()
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
delete(e.peerMap, string(peerId))
e.peerMapMx.Unlock()
} else {
var syncMsg *protobufs.CeremonyCompressedSync
for syncMsg, err = s.Recv(); err == nil; syncMsg, err = s.Recv() {