diff --git a/mirai-core-api/src/commonMain/kotlin/event/EventChannel.kt b/mirai-core-api/src/commonMain/kotlin/event/EventChannel.kt index 333f0790e..8fc7c1cbc 100644 --- a/mirai-core-api/src/commonMain/kotlin/event/EventChannel.kt +++ b/mirai-core-api/src/commonMain/kotlin/event/EventChannel.kt @@ -266,11 +266,7 @@ public open class EventChannel @JvmOverloads internal con * @see CoroutineScope.globalEventChannel `GlobalEventChannel.parentScope()` 的扩展 */ public fun parentScope(coroutineScope: CoroutineScope): EventChannel { - return context(coroutineScope.coroutineContext).run { - val job = coroutineScope.coroutineContext[Job] - if (job != null) parentJob(job) - else this - } + return context(coroutineScope.coroutineContext) } /**