Skip to content

Commit

Permalink
Timer is more suitable for timeout race
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Jan 27, 2024
1 parent 316a7a6 commit e6ca4ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/backup/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func scaleService(cli *client.Client, serviceID string, replicas uint64) ([]stri

func awaitContainerCountForService(cli *client.Client, serviceID string, count int) error {
poll := time.NewTicker(time.Second)
timeout := time.NewTicker(5 * time.Minute)
timeout := time.NewTimer(5 * time.Minute)
defer timeout.Stop()
defer poll.Stop()

Expand Down

0 comments on commit e6ca4ac

Please sign in to comment.