Skip to content

Commit

Permalink
fix(fc2): close channel when context done
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Aug 17, 2024
1 parent 0ee09e1 commit 0e6f030
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fc2/fc2.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ func (f *FC2) HandleWS(
defer span.End()

playlistChan := make(chan *Playlist)
defer close(playlistChan)
go func() {
<-ctx.Done()
close(playlistChan)
}()

// Playlist fetching and quality upgrade loop
//
Expand Down

0 comments on commit 0e6f030

Please sign in to comment.