Commit 48013ded authored by Zhang, Hua's avatar Zhang, Hua

fix delete internal subscription race condition.

After internal subscription is requested to stop, it may publish result as _sub_loop() is called using call_later(). Double check if subscription is stopped before publishing.
parent a58df2d9
......@@ -225,6 +225,8 @@ class InternalSubscription(object):
self.subservice.loop.call_later(self.data.RevisedPublishingInterval / 1000.0, self._sub_loop)
def _sub_loop(self):
if self._stopev:
return
self.publish_results()
self._subscription_loop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment