Explorar el Código

Reconnect on receive of mystery "/pp" messages

Nick Mills-Barrett hace 2 años
padre
commit
2b07d6d8db
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      mauigpapi/mqtt/conn.py

+ 3 - 0
mauigpapi/mqtt/conn.py

@@ -502,6 +502,9 @@ class AndroidMQTT:
                 self._on_realtime_sub(message.payload)
             elif topic == RealtimeTopic.SEND_MESSAGE_RESPONSE:
                 self._handle_send_response(message)
+            elif topic == RealtimeTopic.UNKNOWN_PP:
+                self.log.warning("Reconnecting after receiving /pp message")
+                background_task.create(self._reconnect())
             else:
                 try:
                     waiter = self._response_waiters.pop(topic)