Found my issue or at least the cause with a work around. Seems it was the network provider dropping the TCP connection then the code was looping MQTT connect. Simply added code to reconnect network which has worked.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Connection closed after x minutes | 10 | 2438 | September 1, 2022 | |
| Connection failed : Attempting MQTT connection...failed, rc=-4 | 1 | 489 | April 22, 2025 | |
|
MQTT client wakes up every second when connected to MQTT broker
|
6 | 1517 | June 1, 2021 | |
| I can't connect to MQTT | 5 | 1646 | December 31, 2022 | |
| (SOLVED) Connection and Publishing issues | 3 | 3366 | August 19, 2021 |