Skip to content

Commit

Permalink
streamer: close the trackCh when encoder exits
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Jun 19, 2024
1 parent ef24d66 commit 7f2aa16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions streamer/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ func (s *Streamer) start(ctx context.Context,
// routine, we make a separately cancelable context
ctx, cancel := context.WithCancel(ctx)
defer cancel()
defer close(trackCh)

// store the cancel in the struct so it's accessable from Stop
s.mu.Lock()
Expand Down

0 comments on commit 7f2aa16

Please sign in to comment.