This commit is contained in:
Gerasimos (Makis) Maropoulos 2021-01-27 04:09:46 +02:00
parent f7757c0793
commit ce25e698f8
No known key found for this signature in database
GPG Key ID: 5DBE766BD26A54E7

View File

@ -373,6 +373,9 @@ func (w *responseWriter) Flusher() (http.Flusher, bool) {
// Flush sends any buffered data to the client.
func (w *responseWriter) Flush() {
if flusher, ok := w.Flusher(); ok {
// Flow: WriteHeader -> Flush -> Write -> Write -> Write....
w.tryWriteHeader()
flusher.Flush()
}
}