diff --git a/proxy/api.go b/proxy/api.go index 20d30d4d..0ec0c853 100644 --- a/proxy/api.go +++ b/proxy/api.go @@ -16,6 +16,13 @@ func (srv *Server) SourceStream(ctx context.Context) (eventstream.Stream[radio.P } func (srv *Server) KickSource(ctx context.Context, id radio.SourceID) error { + // make the ctx not have a cancel, this is a very specific behavior to this API + // because it spins off a goroutine that also gets the ctx, but once we return + // from this function the ctx gets canceled and everything in said goroutine fails + // + // also this function call is basically non-reverseable so having it be cancelable by + // the ctx doesn't make sense. + ctx = context.WithoutCancel(ctx) return srv.proxy.RemoveSourceClient(ctx, id) }