improved handling in cancelling the mqtt subscription

This commit is contained in:
avollkopf 2023-03-25 18:50:36 +01:00
parent 62298ae844
commit bcf9b3e06b
2 changed files with 2 additions and 2 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.1.7.a11" __version__ = "4.1.7.a12"
__codename__ = "Groundhog Day" __codename__ = "Groundhog Day"

View file

@ -164,10 +164,10 @@ class SatelliteController:
except asyncio.CancelledError: except asyncio.CancelledError:
# Cancel # Cancel
self.logger.warning("Sub Cancelled") self.logger.warning("Sub Cancelled")
break
except MqttError as e: except MqttError as e:
self.logger.error("Sub MQTT Exception: {}".format(e)) self.logger.error("Sub MQTT Exception: {}".format(e))
except Exception as e: except Exception as e:
self.logger.error("Sub Exception: {}".format(e)) self.logger.error("Sub Exception: {}".format(e))
# wait before try to resubscribe # wait before try to resubscribe
await asyncio.sleep(5) await asyncio.sleep(5)