Skip to content

Commit

Permalink
(hopefully) fix send on closed channel panic (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
umbynos committed Mar 2, 2021
1 parent 260429f commit bbfbd44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bufferflow_timed.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func (b *BufferflowTimed) Init() {
}

close(b.Input)
close(b.done)

}()

Expand Down Expand Up @@ -112,4 +111,5 @@ func (b *BufferflowTimed) IsBufferGloballySendingBackIncomingData() bool {
func (b *BufferflowTimed) Close() {
b.ticker.Stop()
b.done <- true
close(b.done)
}

0 comments on commit bbfbd44

Please sign in to comment.