mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +08:00
Not stopping listening when exception in handling event
This commit is contained in:
parent
1c316a7ee3
commit
9ad54e46a2
@ -47,8 +47,11 @@ internal class Handler<in E : Subscribable>
|
||||
withContext(subscriberContext) { handler.invoke(event) }.also { if (it == ListeningStatus.STOPPED) this.complete() }
|
||||
} catch (e: Throwable) {
|
||||
e.logStacktrace()
|
||||
this.complete() // do not `completeExceptionally`, otherwise parentJob will fail.
|
||||
ListeningStatus.STOPPED
|
||||
// this.complete() // do not `completeExceptionally`, otherwise parentJob will fail.
|
||||
// ListeningStatus.STOPPED
|
||||
|
||||
// not stopping listening.
|
||||
ListeningStatus.LISTENING
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user