From a958294697151ddc532b5147fde2686d6c93b87f Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Mon, 1 Jun 2020 18:43:00 +0530 Subject: [PATCH] StreamWriter: Close head writer (#1347) The head writer was not being closed which would leak the handleRequests go routine. This PR fixes it by closing the head writer. --- stream_writer.go | 3 +++ 1 file changed, 3 insertions(+) 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 }