mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-08 23:40:14 +08:00
Fix heartbeat.cancel
This commit is contained in:
parent
18cc687d78
commit
5d0171674d
@ -104,7 +104,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
|
|||||||
override suspend fun close(cause: Throwable?) {
|
override suspend fun close(cause: Throwable?) {
|
||||||
super.close(cause)
|
super.close(cause)
|
||||||
|
|
||||||
this.heartbeatJob?.cancelChildren(CancellationException("handler closed"))
|
this.heartbeatJob?.cancel(CancellationException("handler closed"))
|
||||||
this.heartbeatJob?.join()//等待 cancel 完成
|
this.heartbeatJob?.join()//等待 cancel 完成
|
||||||
this.heartbeatJob = null
|
this.heartbeatJob = null
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user