control/controlclient: fix accidental backoff reset

Signed-off-by: Kurnia D Win <kurnia.d.win@gmail.com>
pull/7577/head
Kurnia D Win 2 years ago committed by Maisem Ali
parent df3996cae3
commit 9526858b1e

@ -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
}

Loading…
Cancel
Save