From 6ab6eaa790cf9c3076608cfcda3676d420771133 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 24 Feb 2021 16:55:52 +0900 Subject: [PATCH] restart: skip Sleep() for the first iteration of the reconcilation Signed-off-by: Akihiro Suda --- runtime/restart/monitor/monitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/restart/monitor/monitor.go b/runtime/restart/monitor/monitor.go index 3123f24a6..e4ef21080 100644 --- a/runtime/restart/monitor/monitor.go +++ b/runtime/restart/monitor/monitor.go @@ -152,10 +152,10 @@ func (m *monitor) run(interval time.Duration) { interval = 10 * time.Second } for { - time.Sleep(interval) if err := m.reconcile(context.Background()); err != nil { logrus.WithError(err).Error("reconcile") } + time.Sleep(interval) } }