Prevent self re-subscription
This commit is contained in:
parent
6d9ec7a9c5
commit
f25d97fbd3
|
@ -209,6 +209,10 @@ class Pubsub():
|
||||||
:param topic_id: topic_id to subscribe to
|
:param topic_id: topic_id to subscribe to
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Already subscribed
|
||||||
|
if topic_id in self.my_topics:
|
||||||
|
return self.my_topics[topic_id]
|
||||||
|
|
||||||
# Map topic_id to blocking queue
|
# Map topic_id to blocking queue
|
||||||
self.my_topics[topic_id] = asyncio.Queue()
|
self.my_topics[topic_id] = asyncio.Queue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user