Skip to content

Commit 5a2b740

Browse files
authored
Merge pull request #115 from bonitoo-io/feat/api_improvements
fix: Restored writing capability after a connection failure
2 parents b2f99ae + 181a96f commit 5a2b740

File tree

8 files changed

+2291
-2019
lines changed

8 files changed

+2291
-2019
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## 3.5.1 [in progress]
33
### Fixes
44
- [#114](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/114) - Renamed `getRemaingRetryTime()`->`getRemainingRetryTime()`
5+
- [#115](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/115) - Restored writing capability after a connection failure
56

67
## 3.5.0 [2020-10-30]
78
### Features

src/InfluxDbClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ bool InfluxDBClient::flushBufferInternal(bool flashOnlyFull) {
468468
_lastFlushed = millis()/1000;
469469
dropCurrentBatch();
470470
} else if(retry) {
471+
_writeBuffer[_batchPointer]->retryCount++;
471472
if(statusCode > 0) { //apply retry strategy only in case of HTTP errors
472-
_writeBuffer[_batchPointer]->retryCount++;
473473
if(_writeBuffer[_batchPointer]->retryCount > _writeOptions._maxRetryAttempts) {
474474
INFLUXDB_CLIENT_DEBUG("[D] Reached max retry count, dropping batch\n");
475475
dropCurrentBatch();

0 commit comments

Comments
 (0)