The client connects successfully but after some message it drops the connection.
This is a sample output, have tested with 3 different servers. ¿Any help?
.....
WiFi connected
Connecting to MQTT server test.mosquitto.org as WiFiSwitch-18:fe:34:9f:9b:30
Connected to MQTT broker
Subsribed to topic.
MQTT message arrived: topic: test message: 1
Light is 0
Switching light to high
MQTT message arrived: topic: test message: 1
Light is 1
Switching light to high
Connecting to MQTT server test.mosquitto.org as WiFiSwitch-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30
MQTT connect failed!
Connecting to MQTT server test.mosquitto.org as WiFiSwitch-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30
MQTT connect failed!
Connecting to MQTT server test.mosquitto.org as WiFiSwitch-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30
MQTT connect failed!
Connecting to MQTT server test.mosquitto.org as WiFiSwitch-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30-18:fe:34:9f:9b:30
Also tested in a private sever with mosquitto 1.4.2.
Sorry about bothering you, have read and not found any solution....