We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3376a8 commit 6daa73cCopy full SHA for 6daa73c
fastapi_websocket_pubsub/event_notifier.py
@@ -255,7 +255,10 @@ async def notify(
255
# TODO improve with reader/writer lock pattern - so multiple notifications can happen at once
256
async with self._get_subscribers_lock():
257
for topic in topics:
258
+ # TODO: Multiple topics can have the same subscriber - we should first aggregate the entire list of subscribers for all topics,
259
+ # and only then create the `callbacks` list so each subscriber is called only once (to avoid duplicated updates)
260
subscribers = self._topics.get(topic, {})
261
+
262
# handle direct topic subscribers (work on copy to avoid changes after we got the callbacks running)
263
callbacks.append(
264
self.callback_subscribers(
0 commit comments