diff --git a/README.md b/README.md index 0d6210d0..c0bc5ccf 100644 --- a/README.md +++ b/README.md @@ -351,14 +351,14 @@ When the authentication async operation was required, it will insert to the firs If the sync operation was called, it will insert to the first slot in the queue too but after the authentication task slot. -When async Get operation in SSE mode (HTTP Streaming) was currently stored in queue, the new sync and async operations will be inserted before the async SSE (HTTP Streaming) slot. +When async Get operation in `SSE mode (HTTP Streaming)` was currently stored in queue, the new sync and async operations will be inserted before the async `SSE (HTTP Streaming)` slot. -When the async operation queue is full, the new sync and async operations will be cancelled. +When the async operation queue is full or the another SSE mode get function was called, the new sync and async operations will be cancelled. The error code `-118` (`FIREBASE_ERROR_OPERATION_CANCELLED`) or `"operation was cancelled"` will show in the debug message. The finished and time out operating slot will be removed from the queue unless the async SSE and allow the vacant slot for the new async operation. -The async SSE operation will run continuously and repeatedly as long as the FirebaseApp and the services app -(Database, Firestore, Messaging, Functions, Storage and CloudStorage) objects was run in the loop via app.loop() or database.loop(). +The async `SSE` operation will run continuously and repeatedly as long as the FirebaseApp and the services app +(Database, Firestore, Messaging, Functions, Storage and CloudStorage) objects was run in the loop via `app.loop()` or `Database.loop()`. ### Async Client diff --git a/library.json b/library.json index 1f857174..c9eb0b99 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "FirebaseClient", - "version": "1.0.10", + "version": "1.0.11", "keywords": "communication, REST, esp32, esp8266, arduino", "description": "Async Firebase Client library for Arduino.", "repository": { diff --git a/library.properties b/library.properties index 5fea387e..fa90d98e 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=FirebaseClient -version=1.0.10 +version=1.0.11 author=Mobizt diff --git a/src/FirebaseClient.h b/src/FirebaseClient.h index b264a330..ba26b96c 100644 --- a/src/FirebaseClient.h +++ b/src/FirebaseClient.h @@ -30,7 +30,7 @@ #undef FIREBASE_CLIENT_VERSION #endif -#define FIREBASE_CLIENT_VERSION "1.0.10" +#define FIREBASE_CLIENT_VERSION "1.0.11" #include #include "./core/FirebaseApp.h" diff --git a/src/core/AsyncClient/AsyncClient.h b/src/core/AsyncClient/AsyncClient.h index 70fbb002..ad4b8adb 100644 --- a/src/core/AsyncClient/AsyncClient.h +++ b/src/core/AsyncClient/AsyncClient.h @@ -1741,6 +1741,8 @@ class AsyncClientClass { setAsyncError(sData, sData->state, FIREBASE_ERROR_TCP_SEND, !sData->sse, false); sData->return_type = function_return_type_failure; + // This requires by WiFiSSLClient before stating a new connection in case session was reused. + reset(sData, true); return true; } return false; @@ -1752,6 +1754,8 @@ class AsyncClientClass { setAsyncError(sData, sData->state, FIREBASE_ERROR_TCP_RECEIVE_TIMEOUT, !sData->sse, false); sData->return_type = function_return_type_failure; + // This requires by WiFiSSLClient before stating a new connection in case session was reused. + reset(sData, true); return true; } return false;