summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-06-04 11:28:00 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-06-04 12:51:43 +0200
commit86610c7852ee992d6c0b89d4a5cd70081950951d (patch)
treebe991c56c812934af43fe1b21aaee35eb822e8d0 /pkg/api/handlers/compat
parentb64e20a53d3f5de262f2c475be490b35977d5f32 (diff)
downloadpodman-86610c7852ee992d6c0b89d4a5cd70081950951d.tar.gz
podman-86610c7852ee992d6c0b89d4a5cd70081950951d.tar.bz2
podman-86610c7852ee992d6c0b89d4a5cd70081950951d.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/api/handlers/compat')
-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 {