forked from airgradienthq/arduino
Add comment describe two timeout functions call
This commit is contained in:
@ -58,8 +58,8 @@ bool AgApiClient::fetchServerConfiguration(void) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
HTTPClient client;
|
HTTPClient client;
|
||||||
client.setTimeout(timeoutMs);
|
client.setConnectTimeout(timeoutMs); // Set timeout when establishing connection to server
|
||||||
client.setConnectTimeout(timeoutMs);
|
client.setTimeout(timeoutMs); // Timeout when waiting for response from AG server
|
||||||
if (apiRootChanged) {
|
if (apiRootChanged) {
|
||||||
// If apiRoot is changed, assume not using https
|
// If apiRoot is changed, assume not using https
|
||||||
if (client.begin(uri) == false) {
|
if (client.begin(uri) == false) {
|
||||||
@ -134,8 +134,8 @@ bool AgApiClient::postToServer(String data) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
HTTPClient client;
|
HTTPClient client;
|
||||||
client.setTimeout(timeoutMs);
|
client.setConnectTimeout(timeoutMs); // Set timeout when establishing connection to server
|
||||||
client.setConnectTimeout(timeoutMs);
|
client.setTimeout(timeoutMs); // Timeout when waiting for response from AG server
|
||||||
if (apiRootChanged) {
|
if (apiRootChanged) {
|
||||||
// If apiRoot is changed, assume not using https
|
// If apiRoot is changed, assume not using https
|
||||||
if (client.begin(uri) == false) {
|
if (client.begin(uri) == false) {
|
||||||
|
Reference in New Issue
Block a user