Skip to content

Commit

Permalink
[R4R] - {develop}: fix sigma MNT-35 (#1257)
Browse files Browse the repository at this point in the history
fix sigma MNT-35
  • Loading branch information
byteflyfunny authored Jul 7, 2023
1 parent 7c77578 commit 9ede15c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tss/ws/client/tm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
defaultWriteWait = 0
defaultReadWait = 0
defaultPingPeriod = 0
defaultMaxSleepTime = 3600 * time.Second
)

// WSClient is a JSON-RPC client, which uses WebSocket for communication with
Expand Down Expand Up @@ -282,6 +283,9 @@ func (c *WSClient) reconnect() error {

for {
backoffDuration := (1 << uint(attempt)) * time.Second
if backoffDuration > defaultMaxSleepTime {
backoffDuration = defaultMaxSleepTime
}
c.Logger.Info("reconnecting", "attempt", attempt+1, "backoff_duration", backoffDuration)
time.Sleep(backoffDuration)

Expand Down

0 comments on commit 9ede15c

Please sign in to comment.