From 9526858b1e5c27f624d86d35dd7316d9e30eb509 Mon Sep 17 00:00:00 2001 From: Kurnia D Win Date: Wed, 15 Mar 2023 06:45:04 +0700 Subject: [PATCH] control/controlclient: fix accidental backoff reset Signed-off-by: Kurnia D Win --- control/controlclient/auto.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go index 722288d93..ddd0d4f2b 100644 --- a/control/controlclient/auto.go +++ b/control/controlclient/auto.go @@ -407,7 +407,13 @@ func (c *Auto) authRoutine() { c.mu.Unlock() c.sendStatus("authRoutine-url", err, url, nil) - bo.BackOff(ctx, err) + if goal.url == url { + // The server sent us the same URL we already tried, + // backoff to avoid a busy loop. + bo.BackOff(ctx, errors.New("login URL not changing")) + } else { + bo.BackOff(ctx, nil) + } continue }