Cancel startingTimer if exists
This commit is contained in:
parent
389aa33fbb
commit
b21b0c51de
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue