diff --git a/server/server.go b/server/server.go index a4117f8e3f..4e9e773307 100644 --- a/server/server.go +++ b/server/server.go @@ -229,10 +229,10 @@ func (srv *Server) ContainerKill(job *engine.Job) engine.Status { if err != nil { // The signal is not a number, treat it as a string (either like "KILL" or like "SIGKILL") sig = uint64(signal.SignalMap[strings.TrimPrefix(job.Args[1], "SIG")]) - if sig == 0 { - return job.Errorf("Invalid signal: %s", job.Args[1]) - } + } + if sig == 0 { + return job.Errorf("Invalid signal: %s", job.Args[1]) } }