Fix heartbeat.cancel

This commit is contained in:
Him188 2019-12-01 00:06:55 +08:00
parent 18cc687d78
commit 5d0171674d

View File

@ -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