fix: use PutUInt

This commit is contained in:
Derrick Hammer 2024-01-15 12:58:46 -05:00
parent 6e2b08dd05
commit 743ba71e4b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -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))
counter := uint(0)
if p.outgoingPeerFailures.Contains(idString) {
tmp := *p.outgoingPeerFailures.GetInt(idString)
tmp := *p.outgoingPeerFailures.GetUInt(idString)
counter = uint(tmp)
}
counter++
p.outgoingPeerFailures.Put(idString, counter)
p.outgoingPeerFailures.PutUInt(idString, counter)
if counter >= p.maxOutgoingPeerFailures {