diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/internal/EventInternalJvm.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/internal/EventInternalJvm.kt index d2f3a979c..7a2f17694 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/internal/EventInternalJvm.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/internal/EventInternalJvm.kt @@ -29,8 +29,8 @@ internal fun <E : Event> Class<E>._subscribeEventForJaptOnly( ): Listener<E> { return this.kotlin.subscribeInternal( scope.Handler( - EmptyCoroutineContext, - Listener.ConcurrencyKind.CONCURRENT + scope.coroutineContext, + Listener.ConcurrencyKind.LOCKED ) { withContext(Dispatchers.IO) { onEvent.apply(it) } }) } @@ -39,6 +39,6 @@ internal fun <E : Event> Class<E>._subscribeEventForJaptOnly(scope: CoroutineSco return this.kotlin.subscribeInternal( scope.Handler( EmptyCoroutineContext, - Listener.ConcurrencyKind.CONCURRENT + Listener.ConcurrencyKind.LOCKED ) { withContext(Dispatchers.IO) { onEvent.accept(it) }; ListeningStatus.LISTENING; }) } \ No newline at end of file