Fix limititing number of retries

This commit is contained in:
Thomas Kopp 2019-02-02 14:59:00 +01:00
parent 94550e1743
commit 1ea0ea410d
1 changed files with 2 additions and 2 deletions

View File

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