summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/containers_stats.go')
-rw-r--r--pkg/api/handlers/compat/containers_stats.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go
index 62ccd2b93..048321add 100644
--- a/pkg/api/handlers/compat/containers_stats.go
+++ b/pkg/api/handlers/compat/containers_stats.go
@@ -45,8 +45,8 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- if state != define.ContainerStateRunning && !query.Stream {
- utils.InternalServerError(w, define.ErrCtrStateInvalid)
+ if state != define.ContainerStateRunning {
+ utils.Error(w, "Container not running and streaming requested", http.StatusConflict, define.ErrCtrStateInvalid)
return
}