summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-10 06:50:21 -0400
committerGitHub <noreply@github.com>2020-10-10 06:50:21 -0400
commit36d5ab5115133673665caa94fb19134d8c6f61c4 (patch)
tree5f1835e94bd1c41f12df0eba9655c23c6ba2aeb0
parentcec240375d6dceb09c705d6d55e67aeff037327f (diff)
parent0cdb10448ab010811625856da765ae8355038cab (diff)
downloadpodman-36d5ab5115133673665caa94fb19134d8c6f61c4.tar.gz
podman-36d5ab5115133673665caa94fb19134d8c6f61c4.tar.bz2
podman-36d5ab5115133673665caa94fb19134d8c6f61c4.zip
Merge pull request #7986 from jwhonce/issues/7946
Monitor for client closing stream
-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
}
-
}
}