This commit is contained in:
2025-11-28 16:05:11 +08:00
parent b32cb9e6a1
commit a7aae4c4c9

View File

@@ -788,6 +788,18 @@ def main():
pass pass
cleanup_all_browsers() cleanup_all_browsers()
break break
for f, proxy in list(futures_map.items()):
if f.done() and not stop_event.is_set() and not restart_event.is_set():
try:
_ = f.exception()
except Exception:
pass
try:
new_future = executor.submit(proxy_loop, proxy, stop_event)
del futures_map[f]
futures_map[new_future] = proxy
except Exception as e:
logger.error(f"重启代理线程失败: {proxy} - {e}")
time.sleep(0.2) time.sleep(0.2)
try: try: