Unverified Commit e1f433e3 authored by Whyrusleeping's avatar Whyrusleeping Committed by GitHub

Merge pull request #4402 from keks/fix/pubsub-flush

core/commands/pubsub.go: flush output before iterating over received messages
parents 1f2247c6 f3a92617
......@@ -5,6 +5,7 @@ import (
"encoding/binary"
"fmt"
"io"
"net/http"
"sync"
"time"
......@@ -109,6 +110,10 @@ This command outputs data in the following encodings:
}()
}
if f, ok := res.(http.Flusher); ok {
f.Flush()
}
for {
msg, err := sub.Next(req.Context())
if err == io.EOF || err == context.Canceled {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment