mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
Increase websocket messaging timeout (#4235)
* increase websocket timeout * changelog
This commit is contained in:
parent
8b72e9e127
commit
7241cdaf91
@ -17,6 +17,8 @@
|
||||
|
||||
- Update the js client by [@pngwn](https://github.com/pngwn) in [PR 3899](https://github.com/gradio-app/gradio/pull/3899)
|
||||
- Fix documentation for the shape of the numpy array produced by the `Image` component by [@der3318](https://github.com/der3318) in [PR 4204](https://github.com/gradio-app/gradio/pull/4204).
|
||||
- Updates the timeout for websocket messaging from 1 second to 5 seconds by [@abidlabs](https://github.com/abidlabs) in [PR 4235](https://github.com/gradio-app/gradio/pull/4235)
|
||||
|
||||
|
||||
## Breaking Changes:
|
||||
|
||||
|
@ -514,14 +514,14 @@ class App(FastAPI):
|
||||
# to create a unique id for each job
|
||||
try:
|
||||
await asyncio.wait_for(
|
||||
websocket.send_json({"msg": "send_hash"}), timeout=1
|
||||
websocket.send_json({"msg": "send_hash"}), timeout=5
|
||||
)
|
||||
except AsyncTimeOutError:
|
||||
return
|
||||
|
||||
try:
|
||||
session_info = await asyncio.wait_for(
|
||||
websocket.receive_json(), timeout=1
|
||||
websocket.receive_json(), timeout=5
|
||||
)
|
||||
except AsyncTimeOutError:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user