mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
restartmanager: rename max/min as it collides with go1.21 builtin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit cb394a62e5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -86,7 +86,7 @@ func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped
|
||||
restart = true
|
||||
case rm.policy.IsOnFailure():
|
||||
// the default value of 0 for MaximumRetryCount means that we will not enforce a maximum count
|
||||
if max := rm.policy.MaximumRetryCount; max == 0 || rm.restartCount < max {
|
||||
if maxRetryCount := rm.policy.MaximumRetryCount; maxRetryCount == 0 || rm.restartCount < maxRetryCount {
|
||||
restart = exitCode != 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user