Compare commits

..

2 Commits

Author SHA1 Message Date
Andrey
18d0aee391 small fix 2021-01-23 21:08:33 +03:00
Andrey
4e2d659c44 fix mid 2021-01-22 21:32:55 +03:00

View File

@@ -177,7 +177,8 @@ class MegaD:
qos=2, qos=2,
retain=False, retain=False,
) )
await asyncio.wait_for(self.cnd.wait_for(lambda: self.last_port == port), timeout=15) await asyncio.wait_for(self.cnd.wait(), timeout=15)
await asyncio.sleep(0.05)
async def get_all_ports(self): async def get_all_ports(self):
for x in range(37): for x in range(37):
@@ -195,7 +196,8 @@ class MegaD:
def _process_msg(self, msg): def _process_msg(self, msg):
try: try:
_, port = msg.topic.split('/') d = msg.topic.split('/')
port = d[-1]
except ValueError: except ValueError:
self.lg.warning('can not process %s', msg) self.lg.warning('can not process %s', msg)
return return