From 0a48b29cd82dc41410e762650d421f80d8fce2ca Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 3 May 2023 20:44:30 -0300 Subject: [PATCH] Prevent websocket disconnection on the client side --- api-example-stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-example-stream.py b/api-example-stream.py index b299616..4905877 100644 --- a/api-example-stream.py +++ b/api-example-stream.py @@ -39,7 +39,7 @@ async def run(context): 'stopping_strings': [] } - async with websockets.connect(URI) as websocket: + async with websockets.connect(URI, ping_interval=None) as websocket: await websocket.send(json.dumps(request)) yield context # Remove this if you just want to see the reply