omg
This commit is contained in:
parent
4f81b0f38a
commit
7b64d7e7f4
1 changed files with 4 additions and 1 deletions
|
@ -17,7 +17,10 @@ class LatencyModule(niobot.Module):
|
||||||
|
|
||||||
parsed = urllib.parse.urlparse(homeserver)
|
parsed = urllib.parse.urlparse(homeserver)
|
||||||
loc = "https://" + parsed.netloc
|
loc = "https://" + parsed.netloc
|
||||||
|
try:
|
||||||
homeserver = await niobot.resolve_homeserver(parsed.netloc)
|
homeserver = await niobot.resolve_homeserver(parsed.netloc)
|
||||||
|
except ValueError:
|
||||||
|
homeserver = loc
|
||||||
async with httpx.AsyncClient(headers={"User-Agent": niobot.__user_agent__}) as client:
|
async with httpx.AsyncClient(headers={"User-Agent": niobot.__user_agent__}) as client:
|
||||||
timings = []
|
timings = []
|
||||||
for rnd in range(5):
|
for rnd in range(5):
|
||||||
|
|
Loading…
Reference in a new issue