提交 f3a92617 作者: keks 提交者: Steven Allen

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

License: MIT
Signed-off-by: 's avatarkeks <keks@cryposcope.co>
上级 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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论