mirror of
https://codeberg.org/NextPush/nextpush-android.git
synced 2025-01-02 21:10:14 +01:00
Close eventSource
This commit is contained in:
parent
5d64a9b27d
commit
2f92edc511
@ -65,6 +65,7 @@ class SSEListener(val context: Context) : EventSourceListener() {
|
||||
}
|
||||
|
||||
override fun onClosed(eventSource: EventSource) {
|
||||
eventSource.cancel()
|
||||
if (!StartService.isServiceStarted) {
|
||||
return
|
||||
}
|
||||
@ -74,6 +75,7 @@ class SSEListener(val context: Context) : EventSourceListener() {
|
||||
}
|
||||
|
||||
override fun onFailure(eventSource: EventSource, t: Throwable?, response: Response?) {
|
||||
eventSource.cancel()
|
||||
if (!StartService.isServiceStarted) {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user