From a5bbd074f562f702315cfb6ec8f576ae82e290ec Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 16 May 2023 12:49:34 -0400 Subject: [PATCH 1/2] increase websocket timeout --- gradio/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradio/routes.py b/gradio/routes.py index 49fcc6e282a4a..24aa0201e7de9 100644 --- a/gradio/routes.py +++ b/gradio/routes.py @@ -514,14 +514,14 @@ async def join_queue( # 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 From 0ac414e332db9514d5f9877ffd50ae20cddbb915 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 16 May 2023 12:54:13 -0400 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4175c2b85e5a1..e73133a596b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: