Commit 5d017167 authored by Him188's avatar Him188

Fix heartbeat.cancel

parent 18cc687d
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment