Add this.complete() when exception

This commit is contained in:
Him188 2019-12-30 23:21:03 +08:00
parent 50d9b6399e
commit 44cda2b196

View File

@ -47,7 +47,7 @@ internal class Handler<in E : Subscribable>
withContext(subscriberContext) { handler.invoke(event) }.also { if (it == ListeningStatus.STOPPED) this.complete() }
} catch (e: Throwable) {
e.logStacktrace()
//this.completeExceptionally(e)
this.complete() // do not `completeExceptionally`, otherwise parentJob will fail.
ListeningStatus.STOPPED
}
}