Skip to content

Commit bbfbd44

Browse files
committed
(hopefully) fix send on closed channel panic (#621)
1 parent 260429f commit bbfbd44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bufferflow_timed.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ func (b *BufferflowTimed) Init() {
5151
}
5252

5353
close(b.Input)
54-
close(b.done)
5554

5655
}()
5756

@@ -112,4 +111,5 @@ func (b *BufferflowTimed) IsBufferGloballySendingBackIncomingData() bool {
112111
func (b *BufferflowTimed) Close() {
113112
b.ticker.Stop()
114113
b.done <- true
114+
close(b.done)
115115
}

0 commit comments

Comments
 (0)