fix: use PutUInt
This commit is contained in:
parent
6e2b08dd05
commit
743ba71e4b
|
@ -234,13 +234,13 @@ func (p *P2PImpl) ConnectToNode(connectionUris []*url.URL, retried bool, fromPee
|
||||||
p.logger.Error("failed to connect, too many retries", zap.String("node", connectionUri.String()), zap.Error(err))
|
p.logger.Error("failed to connect, too many retries", zap.String("node", connectionUri.String()), zap.Error(err))
|
||||||
counter := uint(0)
|
counter := uint(0)
|
||||||
if p.outgoingPeerFailures.Contains(idString) {
|
if p.outgoingPeerFailures.Contains(idString) {
|
||||||
tmp := *p.outgoingPeerFailures.GetInt(idString)
|
tmp := *p.outgoingPeerFailures.GetUInt(idString)
|
||||||
counter = uint(tmp)
|
counter = uint(tmp)
|
||||||
}
|
}
|
||||||
|
|
||||||
counter++
|
counter++
|
||||||
|
|
||||||
p.outgoingPeerFailures.Put(idString, counter)
|
p.outgoingPeerFailures.PutUInt(idString, counter)
|
||||||
|
|
||||||
if counter >= p.maxOutgoingPeerFailures {
|
if counter >= p.maxOutgoingPeerFailures {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue