diff --git a/CHANGELOG.md b/CHANGELOG.md index d06f931..654f754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 23.2.2 +- Mitigated a mutex issue that can happen during update loop. + ## 23.2.1 - Added manual session control via "Countly::enableManualSessionControl". When enabled, automatic session calls are ignored, while manual calls remain usable for finer control. - Added "checkRQSize" function to return the current number of requests in the queue. diff --git a/include/countly/constants.hpp b/include/countly/constants.hpp index ec80ee2..300e09e 100644 --- a/include/countly/constants.hpp +++ b/include/countly/constants.hpp @@ -13,7 +13,7 @@ #include #define COUNTLY_SDK_NAME "cpp-native-unknown" -#define COUNTLY_SDK_VERSION "23.2.1" +#define COUNTLY_SDK_VERSION "23.2.2" #define COUNTLY_POST_THRESHOLD 2000 #define COUNTLY_KEEPALIVE_INTERVAL 3000 #define COUNTLY_MAX_EVENTS_DEFAULT 200 diff --git a/src/countly.cpp b/src/countly.cpp index 4e32d7e..e5b321a 100644 --- a/src/countly.cpp +++ b/src/countly.cpp @@ -373,6 +373,7 @@ void Countly::start(const std::string &app_key, const std::string &host, int por #ifdef COUNTLY_USE_SQLITE if (configuration->databasePath == "" || configuration->databasePath == " ") { log(LogLevel::ERROR, "[Countly][start] Database path can not be empty or blank."); + mutex->unlock(); return; } #endif @@ -806,7 +807,8 @@ bool Countly::updateSession() { void Countly::packEvents() { try { - // events array + mutex->lock(); + // events array nlohmann::json events = nlohmann::json::array(); std::string event_ids; mutex->unlock();