Add comment describe two timeout functions call

This commit is contained in:
samuelbles07
2025-02-05 01:24:59 +07:00
parent 85ba13de12
commit 03f1b969c2

View File

@ -58,8 +58,8 @@ bool AgApiClient::fetchServerConfiguration(void) {
}
#else
HTTPClient client;
client.setTimeout(timeoutMs);
client.setConnectTimeout(timeoutMs);
client.setConnectTimeout(timeoutMs); // Set timeout when establishing connection to server
client.setTimeout(timeoutMs); // Timeout when waiting for response from AG server
if (apiRootChanged) {
// If apiRoot is changed, assume not using https
if (client.begin(uri) == false) {
@ -134,8 +134,8 @@ bool AgApiClient::postToServer(String data) {
}
#else
HTTPClient client;
client.setTimeout(timeoutMs);
client.setConnectTimeout(timeoutMs);
client.setConnectTimeout(timeoutMs); // Set timeout when establishing connection to server
client.setTimeout(timeoutMs); // Timeout when waiting for response from AG server
if (apiRootChanged) {
// If apiRoot is changed, assume not using https
if (client.begin(uri) == false) {