Skip to content

Commit

Permalink
Add mising connection status error event during token refreshing when…
Browse files Browse the repository at this point in the history
… WiFi reconnection was disabled.
  • Loading branch information
mobizt committed Feb 14, 2023
1 parent 96f069f commit 6f4ebbb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
"version": "4.3.6",
"version": "4.3.7",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "The library supports Firebase products e.g. Realtime database, Cloud Firestore database, Firebase Storage and Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=4.3.6
version=4.3.7

author=Mobizt

Expand Down
8 changes: 3 additions & 5 deletions src/Firebase_ESP_Client.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
#ifndef FIREBASE_CLIENT_VERSION
#define FIREBASE_CLIENT_VERSION "4.3.6"
#define FIREBASE_CLIENT_VERSION "4.3.7"
#endif

/**
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.3.6
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.3.7
*
* This library supports Espressif ESP8266 and ESP32 MCUs and Raspberry Pi RP2040 Pico MCUs.
*
* Created February 7, 2023
*
* Updates:
* - Fix access and custom tokens generation is not finished due to exchange process fail.
* - Fix non-ESP devices WiFi reconnection issue.
* - Fix LittleFS error log issue.
* - Add mising connection status error event during token refreshing when WiFi reconnection was disabled.
*
*
* This work is a part of Firebase ESP Client library
Expand Down
18 changes: 13 additions & 5 deletions src/signer/Signer.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Google's Firebase Token Management class, Signer.cpp version 1.3.8
* Google's Firebase Token Management class, Signer.cpp version 1.3.9
*
* This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico
*
* Created February 7, 2023
* Created February 14, 2023
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -1744,9 +1744,9 @@ void Firebase_Signer::resumeWiFi(FB_TCP_CLIENT *client, bool &net_once_connected
#if defined(ESP32) || defined(ESP8266)
WiFi.reconnect();
#else
// If config exists, use wifi credentials from config instead of local wifi creds.
// The local wifi creds can be accessed trough FCM class in case legacy API used.
fb_esp_wifi_credentials_t *_wifiCreds = config ? &config->wifi.wifiCreds : &wifiCreds;
// If config exists, use wifi credentials from config instead of local wifi creds.
// The local wifi creds can be accessed trough FCM class in case legacy API used.
fb_esp_wifi_credentials_t *_wifiCreds = config ? &config->wifi.wifiCreds : &wifiCreds;

if (_wifiCreds->size() > 0)
{
Expand Down Expand Up @@ -1799,6 +1799,14 @@ bool Firebase_Signer::reconnect()

networkChecking = false;

if (!networkStatus && config->signer.tokens.status == token_status_on_refresh)
{
config->signer.tokens.error.message.clear();
setTokenError(FIREBASE_ERROR_TCP_ERROR_CONNECTION_LOST);
config->internal.fb_last_jwt_generation_error_cb_millis = 0;
sendTokenStatusCB();
}

return networkStatus;
}

Expand Down
4 changes: 2 additions & 2 deletions src/signer/Signer.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Google's Firebase Token Management class, Signer.h version 1.3.8
* Google's Firebase Token Management class, Signer.h version 1.3.9
*
* This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico
*
* Created February 7, 2023
* Created February 14, 2023
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down

0 comments on commit 6f4ebbb

Please sign in to comment.