summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-10-09 15:39:29 -0700
committerJhon Honce <jhonce@redhat.com>2020-10-09 15:39:29 -0700
commit0cdb10448ab010811625856da765ae8355038cab (patch)
tree5f1835e94bd1c41f12df0eba9655c23c6ba2aeb0 /pkg/api
parentcec240375d6dceb09c705d6d55e67aeff037327f (diff)
downloadpodman-0cdb10448ab010811625856da765ae8355038cab.tar.gz
podman-0cdb10448ab010811625856da765ae8355038cab.tar.bz2
podman-0cdb10448ab010811625856da765ae8355038cab.zip
Monitor for client closing stream
Fixes #7946 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/events.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go
index 9efdd1261..a729b84d4 100644
--- a/pkg/api/handlers/compat/events.go
+++ b/pkg/api/handlers/compat/events.go
@@ -139,7 +139,8 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
if flusher, ok := w.(http.Flusher); ok {
flusher.Flush()
}
+ case <-r.Context().Done():
+ return
}
-
}
}