summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-06-04 11:28:00 +0200
committerMatthew Heon <mheon@redhat.com>2021-06-11 13:06:07 -0400
commit5a158563c05ea533d95b73793462941bbea01281 (patch)
treee4bad3df73c1fafc2caafd93c63d7464da604c27 /pkg
parent38fbd2cb9edbe232d6ec7c8b107c50bab34da8e5 (diff)
downloadpodman-5a158563c05ea533d95b73793462941bbea01281.tar.gz
podman-5a158563c05ea533d95b73793462941bbea01281.tar.bz2
podman-5a158563c05ea533d95b73793462941bbea01281.zip
remote events: fix --stream=false
Fix a bug in remote events where only one event would be sent if when streaming is turned off. The source of the bug was that the handler attempted to implement the streaming logic and did it wrong. The fix is rather simple by removing this logic from the handler and let the events backend handle streaming. Fixes: #10529 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/events.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go
index 405e616c5..9fbac91e0 100644
--- a/pkg/api/handlers/compat/events.go
+++ b/pkg/api/handlers/compat/events.go
@@ -75,7 +75,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
coder := json.NewEncoder(w)
coder.SetEscapeHTML(true)
- for stream := true; stream; stream = query.Stream {
+ for {
select {
case err := <-errorChannel:
if err != nil {