fix(session): cancel a session start that is still setting up

This commit is contained in:
Kurt Himebauch committed 2026-09-28 11:52:02 +00:00
1 parent 6e25e0b007
commit 1ea8eb6cb3
1 file changed
+6
@@ -1158,6 +1158,12 @@ class SessionService : Service() {
}
fun stop(context: Context) {
// Not running yet (still downloading or setting up): the start path checks this flag
// and cancels, and a service started here would have no session to stop.
if (!SessionState.running) {
SessionState.stopRequested = true
return
}
context.startService(Intent(context, SessionService::class.java).setAction(ACTION_STOP))
}