Fix MQTT client reconnect logic