Readd poll on ping if necessary

This commit is contained in:
Thomas Lovén 2022-10-17 22:02:10 +02:00
parent d4254be81b
commit 87ed481f80

View File

@ -64,7 +64,10 @@ class PlejdManager:
if not self.mesh.connected: if not self.mesh.connected:
if not await self.mesh.connect(): if not await self.mesh.connect():
return False return False
return await self.mesh.ping() retval = await self.mesh.ping()
if retval and self.mesh.pollonWrite:
await self.mesh.poll()
return retval
async def disconnect(self): async def disconnect(self):
_LOGGER.debug("DISCONNECT") _LOGGER.debug("DISCONNECT")