From 6e2afcfa2f363d60c98446ae7f5030182d1405fa Mon Sep 17 00:00:00 2001 From: Jonathan Fung Date: Thu, 17 Oct 2024 17:18:04 -0400 Subject: [PATCH] increase max message size for websocket --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 1c41f8c..4d9b890 100644 --- a/main.py +++ b/main.py @@ -271,7 +271,11 @@ async def main(args: dict, cpid_to_market_info: dict[int, dict]): params_str = "&".join(params) websocket_addr = f"ws://{host}:{websocket_port}/ws?{params_str}" # Connect to the websocket and start listening - async with websockets.connect(websocket_addr, ping_interval=None) as websocket: + async with websockets.connect( + websocket_addr, + ping_interval=None, + max_size=10*1024*1024, + ) as websocket: interval = conf['interval_ms'] tasks = [ listen_to_websocket(