diff --git a/transport/internet/http/hub.go b/transport/internet/http/hub.go index de20b635..0a5006e9 100644 --- a/transport/internet/http/hub.go +++ b/transport/internet/http/hub.go @@ -51,7 +51,7 @@ func (fw flushWriter) Write(p []byte) (n int, err error) { } n, err = fw.w.Write(p) - if f, ok := fw.w.(http.Flusher); ok { + if f, ok := fw.w.(http.Flusher); ok && err == nil { f.Flush() } return