This commit is contained in:
Nexus 2024-08-19 19:06:38 +01:00
parent 4f81b0f38a
commit 7b64d7e7f4

View file

@ -17,7 +17,10 @@ class LatencyModule(niobot.Module):
parsed = urllib.parse.urlparse(homeserver)
loc = "https://" + parsed.netloc
homeserver = await niobot.resolve_homeserver(parsed.netloc)
try:
homeserver = await niobot.resolve_homeserver(parsed.netloc)
except ValueError:
homeserver = loc
async with httpx.AsyncClient(headers={"User-Agent": niobot.__user_agent__}) as client:
timings = []
for rnd in range(5):