mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Restapi for stop fails if ?t=int not present
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
@@ -1040,10 +1040,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" {
|
||||
|
||||
Reference in New Issue
Block a user