mirror of
https://github.com/CloakHQ/CloakBrowser.git
synced 2026-06-23 11:41:46 +02:00
chore: clean up GeoIP timeout follow-up (#213)
Remove dead null checks, document CLOAKBROWSER_GEOIP_TIMEOUT_SECONDS env var, credit contributor. Fix review findings: - Use timeout-bounded resolve_proxy_exit_ip in _resolve_webrtc_args - Add missing timeout handler on tunneled HTTPS request in JS - Reject nan/inf in Python timeout parsing (parity with JS) - Recompute deadline after CONNECT succeeds in JS proxy tunnel
This commit is contained in:
@@ -12,6 +12,7 @@ from __future__ import annotations
|
||||
|
||||
import ipaddress
|
||||
import logging
|
||||
import math
|
||||
import os
|
||||
import socket
|
||||
import tempfile
|
||||
@@ -167,6 +168,8 @@ def _get_geoip_timeout_seconds() -> float:
|
||||
try:
|
||||
timeout = float(raw)
|
||||
except ValueError:
|
||||
timeout = float("nan")
|
||||
if not math.isfinite(timeout):
|
||||
logger.warning(
|
||||
"Invalid %s=%r; using %.1fs",
|
||||
GEOIP_TIMEOUT_ENV,
|
||||
|
||||
Reference in New Issue
Block a user