mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-08 20:39:36 +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?) {
|
||||
super.close(cause)
|
||||
|
||||
this.heartbeatJob?.cancelChildren(CancellationException("handler closed"))
|
||||
this.heartbeatJob?.cancel(CancellationException("handler closed"))
|
||||
this.heartbeatJob?.join()//等待 cancel 完成
|
||||
this.heartbeatJob = null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user