diff --git a/core/commands/pubsub.go b/core/commands/pubsub.go index 72f83fa1bf6..59a47314951 100644 --- a/core/commands/pubsub.go +++ b/core/commands/pubsub.go @@ -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 {