Skip to content

Commit

Permalink
Merge pull request #48 from org-arl/unsub-fix
Browse files Browse the repository at this point in the history
fjagepy fixing issue with unsubscribing from agents
  • Loading branch information
notthetup authored Nov 5, 2018
2 parents 855d298 + 95dfa73 commit 2803363
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/python/fjagepy/org_arl_fjage_remote/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,13 @@ def unsubscribe(self, topic):
if isinstance(topic, AgentID):
if topic.is_topic == False:
new_topic = AgentID(topic.name + "__ntf", True)
else:
new_topic = topic

if len(self.subscribers) == 0:
return False
try:
self.subscribers.remove(topic.name)
self.subscribers.remove(new_topic.name)
except:
self.logger.critical("Exception: No such topic subscribed: " + new_topic.name)
return True
Expand Down

0 comments on commit 2803363

Please sign in to comment.