Prevent self re-unsubscription
This commit is contained in:
parent
f25d97fbd3
commit
89347be526
|
@ -238,9 +238,11 @@ class Pubsub():
|
|||
:param topic_id: topic_id to unsubscribe from
|
||||
"""
|
||||
|
||||
# Return if we already unsubscribed from the topic
|
||||
if topic_id not in self.my_topics:
|
||||
return
|
||||
# Remove topic_id from map if present
|
||||
if topic_id in self.my_topics:
|
||||
del self.my_topics[topic_id]
|
||||
del self.my_topics[topic_id]
|
||||
|
||||
# Create unsubscribe message
|
||||
packet = rpc_pb2.RPC()
|
||||
|
|
Loading…
Reference in New Issue
Block a user