From 76ed1eae4f1c08af40e611f1aeca4d5a665541e7 Mon Sep 17 00:00:00 2001 From: 1technophile Date: Sat, 20 May 2017 12:54:56 +0200 Subject: [PATCH] correct variable type --- OpenMQTTGateway.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index e143061..5a78b78 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -61,7 +61,7 @@ void callback(char*topic, byte* payload,unsigned int length); PubSubClient client(mqtt_server, mqtt_port, callback, eClient); //MQTT last attemps reconnection date -unsigned int lastReconnectAttempt = 0; +unsigned long lastReconnectAttempt = 0; boolean reconnect() { // Loop until we're reconnected @@ -175,7 +175,6 @@ void loop() unsigned long now = millis(); if (now - lastReconnectAttempt > 5000) { lastReconnectAttempt = now; - trc(F("client mqtt not connected, trying to connect")); // Attempt to reconnect if (reconnect()) { lastReconnectAttempt = 0;