From 03f1b969c24f7d2ab762f52dbcdbddff4d6d935a Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Wed, 5 Feb 2025 01:24:59 +0700 Subject: [PATCH] Add comment describe two timeout functions call --- src/AgApiClient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AgApiClient.cpp b/src/AgApiClient.cpp index b2dbf1f..6eedcc9 100644 --- a/src/AgApiClient.cpp +++ b/src/AgApiClient.cpp @@ -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) {