Cancel startingTimer if exists

This commit is contained in:
sim 2023-04-07 13:18:28 +02:00
parent 389aa33fbb
commit b21b0c51de
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class SSEListener(val context: Context) : EventSourceListener() {
override fun onOpen(eventSource: EventSource, response: Response) {
FailureHandler.newEventSource(context, eventSource)
startingTimer?.cancel()
startingTimer = Timer().schedule(30_000L /* 30secs */) {
StartService.stopService()
showStartErrorNotification(context)