This commit is contained in:
Him188 2020-01-17 12:19:55 +08:00
parent 2b427173ab
commit 68ba984f08

View File

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