From bf1bde79ec344fa44a0831ca2435f0d0a798d994 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Fri, 6 Feb 2026 04:22:03 +0800 Subject: [PATCH] Update astrbot/core/utils/io.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- astrbot/core/utils/io.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/astrbot/core/utils/io.py b/astrbot/core/utils/io.py index 9b0efb6b2..04adca634 100644 --- a/astrbot/core/utils/io.py +++ b/astrbot/core/utils/io.py @@ -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]