Spaces:
BG5
/
Running

BG5 commited on
Commit
9ec7423
·
verified ·
1 Parent(s): bc9b043

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +1 -1
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=8):
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: