Skip to content

Commit

Permalink
Merge pull request #6029 from mysteriumnetwork/add-more-context-timeouts
Browse files Browse the repository at this point in the history
Add more timeouts to endless contexts
  • Loading branch information
soffokl authored Apr 4, 2024
2 parents 6720107 + 1882dab commit 41bffb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session/pingpong/consumer_balance_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (cbt *ConsumerBalanceTracker) alignWithHermes(chainID int64, id identity.Id
eback.InitialInterval = time.Second * 1

boff = backoff.WithMaxRetries(eback, 5)
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

go func() {
Expand Down Expand Up @@ -634,7 +634,7 @@ func (cbt *ConsumerBalanceTracker) recoverGrandTotalPromised(chainID int64, iden
eback.InitialInterval = time.Second * 2

boff = backoff.WithMaxRetries(eback, 10)
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

go func() {
Expand Down

0 comments on commit 41bffb1

Please sign in to comment.