Unverified 提交 e1f433e3 作者: Whyrusleeping 提交者: GitHub

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

core/commands/pubsub.go: flush output before iterating over received messages
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论