fix: use Get/PutUInt

This commit is contained in:
Derrick Hammer 2024-01-15 13:03:49 -05:00
parent 743ba71e4b
commit 3ddf2595b9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -273,13 +273,13 @@ func (p *P2PImpl) ConnectToNode(connectionUris []*url.URL, retried bool, fromPee
p.logger.Error("failed to connect", zap.String("node", connectionUri.String()), zap.Error(err))
delay := p.reconnectDelay.GetInt(idString)
delay := p.reconnectDelay.GetUInt(idString)
if delay == nil {
tmp := 1
tmp := uint(1)
delay = &tmp
}
delayDeref := *delay
p.reconnectDelay.PutInt(idString, delayDeref*2)
p.reconnectDelay.PutUInt(idString, delayDeref*2)
time.Sleep(time.Duration(delayDeref) * time.Second)