Rename FailureHandler.newEvent to newEventSource
This commit is contained in:
parent
074e00ce0f
commit
079c647164
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue