fix(commands:iplocalise|Network): fix map timeout
This commit is contained in:
parent
82b8fb9814
commit
3d8ea556d5
1 changed files with 3 additions and 1 deletions
|
@ -230,7 +230,9 @@ async def get_map_bytes(apikey: str, latlon: str) -> Optional[io.BytesIO]:
|
|||
url = url.format(lonlat=lonlat, apikey=apikey)
|
||||
|
||||
try:
|
||||
async with aiohttp.ClientSession() as cs:
|
||||
async with aiohttp.ClientSession(
|
||||
timeout=aiohttp.ClientTimeout(total=5)
|
||||
) as cs:
|
||||
async with cs.get(url) as s:
|
||||
if s.status != 200:
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue