mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 17:07:16 +02:00
Extend connect to server timeout
Default 5s from HTTPClient
This commit is contained in:
@ -59,6 +59,7 @@ bool AgApiClient::fetchServerConfiguration(void) {
|
||||
#else
|
||||
HTTPClient client;
|
||||
client.setTimeout(timeoutMs);
|
||||
client.setConnectTimeout(timeoutMs);
|
||||
if (apiRootChanged) {
|
||||
// If apiRoot is changed, assume not using https
|
||||
if (client.begin(uri) == false) {
|
||||
@ -134,6 +135,7 @@ bool AgApiClient::postToServer(String data) {
|
||||
#else
|
||||
HTTPClient client;
|
||||
client.setTimeout(timeoutMs);
|
||||
client.setConnectTimeout(timeoutMs);
|
||||
if (apiRootChanged) {
|
||||
// If apiRoot is changed, assume not using https
|
||||
if (client.begin(uri) == false) {
|
||||
|
Reference in New Issue
Block a user