From 819717d278b78491f6030a8aa1705c67a0ad3ee2 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+rprx@users.noreply.github.com> Date: Fri, 12 Mar 2021 11:38:36 +0000 Subject: [PATCH] Fix https://github.com/XTLS/Xray-core/issues/366 --- transport/internet/http/hub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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