diff --git a/CHANGELOG.md b/CHANGELOG.md index f27f776fb..ac6535466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ BUG FIXES: * driver/docker: Support `port_map` for static ports [GH-476] * driver/docker: Pass 0.2.0-style port environment variables to the docker container [GH-476] * client/service discovery: Make Service IDs unique [GH-479] + * client/restart policy: Not restarting Batch Jobs if the exit code is 0 ## 0.2.0 (November 18, 2015) diff --git a/client/restarts.go b/client/restarts.go index ebc5dacba..7f42ad432 100644 --- a/client/restarts.go +++ b/client/restarts.go @@ -48,7 +48,7 @@ func (b *batchRestartTracker) increment() { } func (b *batchRestartTracker) nextRestart(exitCode int) (bool, time.Duration) { - if (b.count < b.maxAttempts) && (exitCode > 0) { + if b.count < b.maxAttempts && exitCode > 0 { b.increment() return true, b.delay }