From 408eaef66460597c9e76b7a6f7e6af5bceabc0e4 Mon Sep 17 00:00:00 2001 From: woorui Date: Thu, 1 Jun 2023 16:54:09 +0800 Subject: [PATCH] refactor: close buffer done --- buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer.go b/buffer.go index 0412df8..ae18cd7 100644 --- a/buffer.go +++ b/buffer.go @@ -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)