Skip to content

Commit

Permalink
1 second retry
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Nov 9, 2023
1 parent 39b83a2 commit d1d1a56
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions signer/remote_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
cometprotoprivval "github.com/cometbft/cometbft/proto/tendermint/privval"
)

const sleep = 1

type HorcruxConnection interface {
SendRequest(request cometprotoprivval.Message) (*cometprotoprivval.Message, error)
}
Expand Down Expand Up @@ -84,8 +86,8 @@ func (rs *ReconnRemoteSigner) loop() {
netConn, err := rs.dialer.Dial(proto, address)
if err != nil {
rs.Logger.Error("Dialing", "err", err)
rs.Logger.Info("Retrying", "sleep (s)", 3, "address", rs.address)
time.Sleep(time.Second * 3)
rs.Logger.Info("Retrying", "sleep (s)", sleep, "address", rs.address)
time.Sleep(time.Second * time.Duration(sleep))
continue
}

Expand All @@ -97,8 +99,8 @@ func (rs *ReconnRemoteSigner) loop() {
}
conn = nil
rs.Logger.Error("Secret Conn", "err", err)
rs.Logger.Info("Retrying", "sleep (s)", 3, "address", rs.address)
time.Sleep(time.Second * 3)
rs.Logger.Info("Retrying", "sleep (s)", sleep, "address", rs.address)
time.Sleep(time.Second * time.Duration(sleep))
continue
}
}
Expand Down

0 comments on commit d1d1a56

Please sign in to comment.