Skip to content

Commit 2e7fe10

Browse files
committed
fix: setting httpReadTimeout as connect timeout for HTTP connection on ESP32 (#149)
1 parent 84af71b commit 2e7fe10

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## 3.8.1 [in progress]
3+
### Fixes
4+
- [#150](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/150) - `HTTPOptions::httpReadTimeout` is also set as the connect timeout for HTTP connection on ESP32. It doesn't work for HTTPS connection yet.
5+
26
## 3.8.0 [2021-04-01]
37
### Features
48
- [#143](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/143) - `InfluxDBClient::setInsecure` now works also for ESP32. Requires Arduino ESP32 SDK 1.0.5 or higher

src/InfluxDbClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ void InfluxDBClient::setHTTPOptions(const HTTPOptions & httpOptions) {
319319
}
320320
_httpClient->setReuse(_httpOptions._connectionReuse);
321321
_httpClient->setTimeout(_httpOptions._httpReadTimeout);
322+
#if defined(ESP32)
323+
_httpClient->setConnectTimeout(_httpOptions._httpReadTimeout);
324+
#endif
322325
}
323326

324327
void InfluxDBClient::resetBuffer() {

0 commit comments

Comments
 (0)