correct EKC container loading while file is being changes;

pull/128/head
Bryan Biedenkapp 3 months ago
parent 18a4a9b18d
commit 56bff0489b

@ -134,6 +134,7 @@ int findLastChar(const uint8_t* buffer, uint32_t len, char target)
// ---------------------------------------------------------------------------
std::mutex CryptoContainer::s_mutex;
std::mutex CryptoContainer::s_loadMutex;
// ---------------------------------------------------------------------------
// Public Class Members
@ -366,6 +367,7 @@ bool CryptoContainer::load()
#if !defined(ENABLE_SSL)
return false;
#else
std::lock_guard<std::mutex> loadLock(s_loadMutex);
if (!m_enabled) {
return false;
}

@ -288,6 +288,7 @@ private:
bool m_stop;
static std::mutex s_mutex;
static std::mutex s_loadMutex;
/**
* @brief Loads the table from the passed lookup table file.

Loading…
Cancel
Save

Powered by TurnKey Linux.