Skip to content

Commit

Permalink
fix: fix time.Ticker not stop (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtlanCI authored Oct 16, 2023
1 parent 6974c0b commit 1740a95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions localsampletrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ func (s *LocalSampleTrack) writeWorker(provider SampleProvider, onComplete func(

nextSampleTime := time.Now()
ticker := time.NewTicker(10 * time.Millisecond)
// issue 324
defer ticker.Stop()

for {
sample, err := provider.NextSample()
if err == io.EOF {
Expand Down

0 comments on commit 1740a95

Please sign in to comment.