Fix limititing number of retries
This commit is contained in:
parent
94550e1743
commit
1ea0ea410d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue