From 5d0171674df6adc737646e1e47ef5a1ba9f67b95 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 1 Dec 2019 00:06:55 +0800 Subject: [PATCH] Fix heartbeat.cancel --- .../network/protocol/tim/TIMBotNetworkHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt index 0c7b20c61..642c468b8 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt @@ -104,7 +104,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou override suspend fun close(cause: Throwable?) { super.close(cause) - this.heartbeatJob?.cancelChildren(CancellationException("handler closed")) + this.heartbeatJob?.cancel(CancellationException("handler closed")) this.heartbeatJob?.join()//等待 cancel 完成 this.heartbeatJob = null