diff --git a/common/buf/writer.go b/common/buf/writer.go index 6ff8a6b6b..f14d83c3d 100644 --- a/common/buf/writer.go +++ b/common/buf/writer.go @@ -118,7 +118,9 @@ func (w *BufferedWriter) Write(b []byte) (int, error) { nBytes, err := w.buffer.Write(b) totalBytes += nBytes - if err != nil { + + // ErrBufferFull means a partial write, so flush below and continue + if err != nil && err != ErrBufferFull { return totalBytes, err } if !w.buffered || w.buffer.IsFull() {