Skip to content

Commit 9b7cb82

Browse files
committed
Fix the undetectable timeout issue #203
1 parent 2708e7a commit 9b7cb82

58 files changed

Lines changed: 67 additions & 61 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "FirebaseClient",
3-
"version": "1.4.17",
3+
"version": "1.4.18",
44
"keywords": "communication, REST, esp32, esp8266, arduino",
55
"description": "Async Firebase Client library for Arduino.",
66
"repository": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=FirebaseClient
22

3-
version=1.4.17
3+
version=1.4.18
44

55
author=Mobizt
66

src/FirebaseClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created October 30, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

src/cloud_storage/CloudStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created December 27, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

src/cloud_storage/DataOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created October 29, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

src/core/AppBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created June 25, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

src/core/AsyncClient/AsyncClient.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
* Created January 8, 2025
2+
* Created January 14, 2025
33
*
44
* For MCU build target (CORE_ARDUINO_XXXX), see Options.h.
55
*
66
* The MIT License (MIT)
7-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
7+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
88
*
99
*
1010
* Permission is hereby granted, free of charge, to any person returning a copy of
@@ -2309,11 +2309,17 @@ class AsyncClientClass : public ResultBase, RTDBResultBase
23092309
while (sData->state == async_state_send_header || sData->state == async_state_send_payload)
23102310
{
23112311
sData->return_type = send(sData);
2312-
sData->response.feedTimer(!sData->async && sync_read_timeout_sec > 0 ? sync_read_timeout_sec : -1);
23132312
handleSendTimeout(sData);
23142313
if (sData->async || sData->return_type == function_return_type_failure)
23152314
break;
23162315
}
2316+
2317+
// The response time-out timer should be initiated here with appropriate timeout
2318+
// when the request was sucessfully sent (with or without payload).
2319+
// Without this initialization, the subsequent sData->response.feedTimer may not execute in case
2320+
// no server response returns because of server is out of reach or network/router is not responding.
2321+
if (sData->state == async_state_read_response)
2322+
sData->response.feedTimer(!sData->async && sync_read_timeout_sec > 0 ? sync_read_timeout_sec : -1);
23172323
}
23182324

23192325
if (sending)

src/core/AsyncClient/RequestHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created December 27, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

src/core/AsyncClient/ResponseHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created December 27, 2024
33
*
44
* The MIT License (MIT)
5-
* Copyright (c) 2024 K. Suwatchai (Mobizt)
5+
* Copyright (c) 2025 K. Suwatchai (Mobizt)
66
*
77
*
88
* Permission is hereby granted, free of charge, to any person returning a copy of

0 commit comments

Comments
 (0)