diff --git a/gradio/routes.py b/gradio/routes.py index 0212713fb5ec..6b75776cbd5e 100644 --- a/gradio/routes.py +++ b/gradio/routes.py @@ -612,7 +612,7 @@ async def stop_stream(): # locally and in deployment we should use the event-based approach if os.getenv("GRADIO_IS_E2E_TEST") and sys.version_info < (3, 9): while app.get_blocks().is_running: - await asyncio.sleep(0.) + await asyncio.sleep(0.25) return "stop" else: await app.stop_event.wait()