Skip to content

Commit

Permalink
refactor: close buffer done
Browse files Browse the repository at this point in the history
  • Loading branch information
woorui committed Jun 1, 2023
1 parent 0f800a4 commit 408eaef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (b *Buffer[T]) run() {
case <-b.ctx.Done():
close(b.datas)
b.internalFlush(flat)
b.done <- struct{}{}
close(b.done)
return
case d := <-b.datas:
flat = append(flat, d)
Expand Down

0 comments on commit 408eaef

Please sign in to comment.