Closed maorcc closed 4 years ago
Changed the code to retry.
With the fist fix I have seen the following error:
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
I'v created a pull-request above with a fix.
After a power outage, if the pima service starts when the MQTT broker is not yet available, the pima service fails to start with the error below.