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?.cancel(CancellationException("relogin", cause))
heartbeatJob?.join() heartbeatJob?.join()
if (::channel.isInitialized) { if (::channel.isInitialized) {
if (channel.isOpen) { // if (channel.isOpen) {
kotlin.runCatching { // kotlin.runCatching {
registerClientOnline(500) // registerClientOnline(500)
}.exceptionOrNull() ?: return // }.exceptionOrNull() ?: return
logger.info("Cannot do fast relogin. Trying slow relogin") // logger.info("Cannot do fast relogin. Trying slow relogin")
} // }
channel.close() channel.close()
} }
channel = PlatformSocket() channel = PlatformSocket()