mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Explicit implement CoroutineScope
This commit is contained in:
parent
35dd858ffd
commit
41a5ce885d
@ -39,7 +39,7 @@ internal expect val NetworkDispatcher: CoroutineDispatcher
|
||||
* @see BotNetworkHandler
|
||||
*/
|
||||
internal class TIMBotNetworkHandler internal constructor(coroutineContext: CoroutineContext, override inline val bot: Bot) :
|
||||
BotNetworkHandler<TIMBotNetworkHandler.BotSocketAdapter>, PacketHandlerList() {
|
||||
BotNetworkHandler<TIMBotNetworkHandler.BotSocketAdapter>, PacketHandlerList(), CoroutineScope {
|
||||
|
||||
|
||||
override val coroutineContext: CoroutineContext =
|
||||
@ -512,7 +512,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
|
||||
sessionKey = packet.sessionKey
|
||||
bot.logger.info("sessionKey = ${sessionKey.value.toUHexString()}")
|
||||
|
||||
heartbeatJob = launch {
|
||||
heartbeatJob = this@TIMBotNetworkHandler.launch {
|
||||
while (socket.isOpen) {
|
||||
delay(configuration.heartbeatPeriod.millisecondsLong)
|
||||
with(session) {
|
||||
|
Loading…
Reference in New Issue
Block a user