mirror of
https://github.com/containers/podman.git
synced 2025-09-10 08:22:23 +08:00
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>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user