This commit is contained in:
nafer committed 2026-03-06 02:07:51 +03:00
1 parent b2e3ccea91
commit 0f97b4320e
1 file changed
+6 -3
+6 -3
View File
@@ -193,9 +193,12 @@ async def run_browser_task(task_id: str, task: str, max_steps: int, model: str):
# Проверка порта
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
if s.connect_ex(('127.0.0.1', REMOTE_DEBUGGING_PORT)) == 0:
print(f"[{task_id}] Port {REMOTE_DEBUGGING_PORT} is OPEN internally!")
for host in ['127.0.0.1', '0.0.0.0', ip_address]:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
if s.connect_ex((host, REMOTE_DEBUGGING_PORT)) == 0:
print(f"[{task_id}] Port {REMOTE_DEBUGGING_PORT} is OPEN on {host}!")
else:
print(f"[{task_id}] Port {REMOTE_DEBUGGING_PORT} is CLOSED on {host}!")
try:
response = urllib.request.urlopen(f"{cdp_url}/json/version", timeout=2)