Skip to content

Commit

Permalink
StreamWriter: Close head writer (#1347)
Browse files Browse the repository at this point in the history
The head writer was not being closed which would leak the
handleRequests go routine. This PR fixes it by closing the head
writer.
  • Loading branch information
Ibrahim Jarif committed Oct 2, 2020
1 parent 90daf43 commit a958294
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a958294

Please sign in to comment.