mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-04 12:12:25 +08:00
[core] [Network] Handle non ipaddress converting caused by some unknown
This commit is contained in:
parent
58ab562322
commit
ddfd22e541
@ -168,8 +168,16 @@ internal class StatSvc {
|
||||
) = impl("online", client, 1L or 2 or 4, client.onlineStatus, regPushReason) {
|
||||
if (client.bot.configuration.protocol == BotConfiguration.MiraiProtocol.ANDROID_PHONE) {
|
||||
client.bot.components[ServerList].run {
|
||||
uOldSSOIp = lastDisconnectedIP.toIpV4Long()
|
||||
uNewSSOIp = lastConnectedIP.toIpV4Long()
|
||||
kotlin.runCatching {
|
||||
uOldSSOIp = lastDisconnectedIP.toIpV4Long()
|
||||
uNewSSOIp = lastConnectedIP.toIpV4Long()
|
||||
}.onFailure { err ->
|
||||
client.bot.network.logger.warning({
|
||||
"Exception when converting ipaddress to long: ld=${lastDisconnectedIP}, lc=${lastConnectedIP}"
|
||||
}, err)
|
||||
uNewSSOIp = 0
|
||||
uOldSSOIp = 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uOldSSOIp = 0
|
||||
|
Loading…
Reference in New Issue
Block a user