Browse Source

Fix limititing number of retries

Thomas Kopp 1 year ago
parent
commit
1ea0ea410d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      firmware/influxdb.ino

+ 2
- 2
firmware/influxdb.ino View File

@@ -4,7 +4,6 @@ void pushToInfluxDB(String device, float sensorValues[]) {
4 4
   uint8_t tries = 0;
5 5
   boolean addComma = false;
6 6
 
7
-  tries++;
8 7
   String msg = "weather,device=" + device + " ";
9 8
   if (!(isnan(sensorValues[SENSOR_TEMPERATURE])))
10 9
   {
@@ -66,6 +65,7 @@ void pushToInfluxDB(String device, float sensorValues[]) {
66 65
 #endif
67 66
 
68 67
   do {
68
+    tries++;
69 69
     influxdb.write(msg);
70 70
   } while (influxdb.response() != DB_SUCCESS and tries < 5);
71
-}
71
+}

Loading…
Cancel
Save