From 409496af240c0589cde2afccb36768d21e47d185 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Sat, 27 Jan 2024 21:07:04 +0100 Subject: [PATCH] Timer is more suitable for timeout race --- cmd/backup/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/backup/docker.go b/cmd/backup/docker.go index 87de18d..340e14f 100644 --- a/cmd/backup/docker.go +++ b/cmd/backup/docker.go @@ -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()