mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-07 22:36:02 +00:00
perf: no longer get host ip
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import aiohttp
|
||||
|
||||
|
||||
async def get_myip() -> str:
|
||||
try:
|
||||
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=10)) as session:
|
||||
async with session.get('https://ip.useragentinfo.com/myip') as response:
|
||||
return await response.text()
|
||||
except Exception:
|
||||
return '0.0.0.0'
|
||||
Reference in New Issue
Block a user