mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-06 12:30:29 +08:00
fix: httpx timeouts cause gradio to fail during launch (#8962)
* fix: httpx timeouts cause gradio to fail during launch This has been fixed in https://github.com/gradio-app/gradio/pull/7707, but it seems it has been reintroduced during some other code changes/refactoring. * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
d072252156
commit
c68eefba6c
5
.changeset/eager-roses-throw.md
Normal file
5
.changeset/eager-roses-throw.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:fix: httpx timeouts cause gradio to fail during launch
|
@ -55,6 +55,6 @@ def url_ok(url: str) -> bool:
|
||||
if r.status_code in (200, 401, 302): # 401 or 302 if auth is set
|
||||
return True
|
||||
time.sleep(0.500)
|
||||
except (ConnectionError, httpx.ConnectError):
|
||||
except (ConnectionError, httpx.ConnectError, httpx.TimeoutException):
|
||||
return False
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user