Update astrbot/core/utils/io.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
LIghtJUNction
2026-02-06 04:22:03 +08:00
committed by GitHub
parent f309638192
commit bf1bde79ec
+4 -2
View File
@@ -254,8 +254,10 @@ async def get_public_ip_address() -> list[IPv4Address | IPv6Address]:
ip = ip_address(raw_ip)
if ip.version not in found_ips:
found_ips[ip.version] = ip
except Exception:
pass
except Exception as e:
# Ignore errors from individual services so that a single failing
# endpoint does not prevent discovering the public IP from others.
logger.debug("Failed to fetch public IP from %s: %s", url, e)
async with aiohttp.ClientSession() as session:
tasks = [fetch(session, url) for url in urls]