mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-13 03:16:05 +08:00
Simplify
This commit is contained in:
parent
2b427173ab
commit
68ba984f08
@ -36,8 +36,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
|
||||
println("SessionTicketKey=${bot.client.wLoginSigInfo.wtSessionTicketKey.toUHexString()}")
|
||||
}
|
||||
|
||||
internal fun launchPacketProcessor(rawInput: ByteReadPacket): Job {
|
||||
return launch(CoroutineName("Incoming Packet handler")) {
|
||||
internal fun launchPacketProcessor(rawInput: ByteReadPacket): Job = launch(CoroutineName("Incoming Packet handler")) {
|
||||
rawInput.debugPrint("Received").use { input ->
|
||||
if (input.remaining == 0L) {
|
||||
bot.logger.error("Empty packet received. Consider if bad packet was sent.")
|
||||
@ -55,7 +54,6 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun processReceive() {
|
||||
while (channel.isOpen) {
|
||||
|
Loading…
Reference in New Issue
Block a user