Commit f3a92617 authored by keks's avatar keks Committed by Steven Allen

core/commands/pubsub.go: flush output before iterating over received messages

License: MIT
Signed-off-by: default avatarkeks <keks@cryposcope.co>
parent b18b1e90
......@@ -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