Remove useless fast re-login

This commit is contained in:
Him188 2020-04-06 20:57:51 +08:00
parent 4b58aa9c52
commit b72589de24

View File

@ -109,12 +109,12 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
heartbeatJob?.cancel(CancellationException("relogin", cause))
heartbeatJob?.join()
if (::channel.isInitialized) {
if (channel.isOpen) {
kotlin.runCatching {
registerClientOnline(500)
}.exceptionOrNull() ?: return
logger.info("Cannot do fast relogin. Trying slow relogin")
}
// if (channel.isOpen) {
// kotlin.runCatching {
// registerClientOnline(500)
// }.exceptionOrNull() ?: return
// logger.info("Cannot do fast relogin. Trying slow relogin")
// }
channel.close()
}
channel = PlatformSocket()