Commit 9ad54e46 authored by Him188's avatar Him188

Not stopping listening when exception in handling event

parent 1c316a7e
...@@ -47,8 +47,11 @@ internal class Handler<in E : Subscribable> ...@@ -47,8 +47,11 @@ internal class Handler<in E : Subscribable>
withContext(subscriberContext) { handler.invoke(event) }.also { if (it == ListeningStatus.STOPPED) this.complete() } withContext(subscriberContext) { handler.invoke(event) }.also { if (it == ListeningStatus.STOPPED) this.complete() }
} catch (e: Throwable) { } catch (e: Throwable) {
e.logStacktrace() e.logStacktrace()
this.complete() // do not `completeExceptionally`, otherwise parentJob will fail. // this.complete() // do not `completeExceptionally`, otherwise parentJob will fail.
ListeningStatus.STOPPED // ListeningStatus.STOPPED
// not stopping listening.
ListeningStatus.LISTENING
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment