From a5442772fc22138dc18fcd3c99c2727f1e9007dd Mon Sep 17 00:00:00 2001 From: Timothy Pogue Date: Tue, 22 Nov 2022 09:42:09 -0700 Subject: [PATCH] ensure only broadcasting to subscribed topics --- freqtrade/rpc/api_server/api_ws.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/rpc/api_server/api_ws.py b/freqtrade/rpc/api_server/api_ws.py index 618490ec8..fe2968c05 100644 --- a/freqtrade/rpc/api_server/api_ws.py +++ b/freqtrade/rpc/api_server/api_ws.py @@ -34,7 +34,8 @@ async def channel_broadcaster(channel: WebSocketChannel, message_stream: Message Iterate over messages in the message stream and send them """ async for message in message_stream: - await channel.send(message, timeout=True) + if channel.subscribed_to(message.get('type')): + await channel.send(message, timeout=True) async def _process_consumer_request(