From 44cda2b196a02148d6711124fc0adf4b166edbe4 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 30 Dec 2019 23:21:03 +0800 Subject: [PATCH] Add `this.complete()` when exception --- .../net.mamoe.mirai/event/internal/InternalEventListeners.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/internal/InternalEventListeners.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/internal/InternalEventListeners.kt index 50d33d2c7..ba64793b6 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/internal/InternalEventListeners.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/internal/InternalEventListeners.kt @@ -47,7 +47,7 @@ internal class Handler 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 } }