Merge pull request #12822 from brahmaroutu/container_stop_api

restapi stop fails if ?t=int not present
This commit is contained in:
David Calavera
2015-05-07 09:38:59 -07:00
2 changed files with 20 additions and 4 deletions
+1 -4
View File
@@ -1037,10 +1037,7 @@ func (s *Server) postContainersStop(version version.Version, w http.ResponseWrit
return fmt.Errorf("Missing parameter")
}
seconds, err := strconv.Atoi(r.Form.Get("t"))
if err != nil {
return err
}
seconds, _ := strconv.Atoi(r.Form.Get("t"))
if err := s.daemon.ContainerStop(vars["name"], seconds); err != nil {
if err.Error() == "Container already stopped" {