Skip to content

Commit

Permalink
streamer: fix the streamer not stopping if not supposed to be streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Jan 2, 2025
1 parent 093dc07 commit fa7ba44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions streamer/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ func (s *Streamer) userChange(ctx context.Context, user *radio.User, timer *util
return
}

// we're not supposed to be streaming, don't start if that was asked of us
// but we also need to stop if we are somehow already running, do this with
// force because the only way this should happen is if we got kicked from
// icecast.
s.Stop(context.WithoutCancel(ctx), true)
zerolog.Ctx(ctx).Info().
Str("me", s.StreamUser.Username).
Str("user", user.Username).
Expand Down

0 comments on commit fa7ba44

Please sign in to comment.