Rename FailureHandler.newEvent to newEventSource

This commit is contained in:
sim 2022-09-14 00:14:49 +02:00
parent 074e00ce0f
commit 079c647164
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ interface FailureHandler {
// This is the last eventSource opened // This is the last eventSource opened
var eventSource: EventSource? var eventSource: EventSource?
fun newEvent(context: Context, eventSource: EventSource) { fun newEventSource(context: Context, eventSource: EventSource) {
Log.d(TAG,"newEvent/Eventsource: $eventSource") Log.d(TAG,"newEvent/Eventsource: $eventSource")
this.eventSource = eventSource this.eventSource = eventSource
nFails = 0 nFails = 0

View File

@ -24,7 +24,7 @@ class SSEListener (val context: Context) : EventSourceListener() {
} }
override fun onOpen(eventSource: EventSource, response: Response) { override fun onOpen(eventSource: EventSource, response: Response) {
StartService.newEvent(context, eventSource) StartService.newEventSource(context, eventSource)
StartService.wakeLock?.let { StartService.wakeLock?.let {
while (it.isHeld) { while (it.isHeld) {
it.release() it.release()