networking fix
@@ -94,7 +94,8 @@ def get_external_ip() -> str:
"""
# --- Try curl.
try:
- external_ip = os.popen('curl -s ifconfig.me').readline()
+ process = os.popen('curl -s ifconfig.me', close_fds=True)
+ external_ip = process.readline()
assert isinstance(ip_to_int(external_ip), int)
return str(external_ip)
except Exception:
