Update fun.py
Browse files
fun.py
CHANGED
@@ -87,7 +87,7 @@ async def open_browser(request: Request):
|
|
87 |
deduped_args.append(arg)
|
88 |
args = [CHROME_PATH] + deduped_args
|
89 |
proc = subprocess.Popen(args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
90 |
-
if not wait_port("127.0.0.1", port, timeout=
|
91 |
proc.terminate()
|
92 |
return {"code": 2, "msg": f"chrome端口{port}未就绪"}
|
93 |
async with httpx.AsyncClient() as client:
|
|
|
87 |
deduped_args.append(arg)
|
88 |
args = [CHROME_PATH] + deduped_args
|
89 |
proc = subprocess.Popen(args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
90 |
+
if not wait_port("127.0.0.1", port, timeout=60):
|
91 |
proc.terminate()
|
92 |
return {"code": 2, "msg": f"chrome端口{port}未就绪"}
|
93 |
async with httpx.AsyncClient() as client:
|