mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: ensure error passed to backoff is wrapped in self-check
In commit 670879d1, the backoff is changed to be passed a real error, instead of a place holder. However, the test query may return a failed response with a nil error, causing the backoff never fire. Fixing this by ensuring the error is wrapped, so the backoff always see a non-nil error.
This commit is contained in:
committed by
Cuong Manh Le
parent
d2fc530316
commit
20eae82f11
@@ -890,7 +890,7 @@ func selfCheckStatus(status service.Status) service.Status {
|
||||
mainLog.Debug().Msgf("self-check against %q succeeded", selfCheckFQDN)
|
||||
return status
|
||||
}
|
||||
bo.BackOff(ctx, err)
|
||||
bo.BackOff(ctx, fmt.Errorf("ExchangeContext: %w", err))
|
||||
}
|
||||
mainLog.Debug().Msgf("self-check against %q failed", selfCheckFQDN)
|
||||
return service.StatusUnknown
|
||||
|
||||
Reference in New Issue
Block a user