diff --git a/stream_writer.go b/stream_writer.go index f9304c7e7..80cf689f3 100644 --- a/stream_writer.go +++ b/stream_writer.go @@ -223,6 +223,9 @@ func (sw *StreamWriter) Flush() error { y.ValueStruct{Value: data}); err != nil { return err } + + headWriter.closer.SignalAndWait() + if err := headWriter.Done(); err != nil { return err }