This commit is contained in:
yumoqing 2021-11-25 10:37:15 +08:00
parent 2fb90a3064
commit eb105a7efa

View File

@ -95,7 +95,7 @@ class TopicSubscriber:
self.sub = self.context.socket(zmq.SUB)
self.sub.connect(self.url)
# subscribe to topic 'en' or 'jp'
if isinstance(self.topic, []):
if isinstance(self.topic, list):
for t in self.topic:
self.sub.setsockopt(zmq.SUBSCRIBE, t.encode('utf-8'))
else: