diff --git a/http3/response_writer.go b/http3/response_writer.go index 26e45a09..dfbf0279 100644 --- a/http3/response_writer.go +++ b/http3/response_writer.go @@ -120,8 +120,12 @@ func (w *responseWriter) Write(p []byte) (int, error) { return w.bufferedStr.Write(p) } +func (w *responseWriter) FlushError() error { + return w.bufferedStr.Flush() +} + func (w *responseWriter) Flush() { - if err := w.bufferedStr.Flush(); err != nil { + if err := w.FlushError(); err != nil { w.logger.Errorf("could not flush to stream: %s", err.Error()) } }