[News] Added Mutex for updater check
This commit is contained in:
parent
d0e760108f
commit
983e1bd8f0
@ -8,6 +8,7 @@ namespace Components
|
||||
std::thread News::Thread;
|
||||
std::string News::UpdaterArgs;
|
||||
std::string News::UpdaterHash;
|
||||
std::mutex News::UpdaterMutex;
|
||||
|
||||
bool News::unitTest()
|
||||
{
|
||||
@ -53,6 +54,8 @@ namespace Components
|
||||
|
||||
bool News::GetLatestUpdater()
|
||||
{
|
||||
std::lock_guard<std::mutex> _(News::UpdaterMutex);
|
||||
|
||||
if (Utils::IO::FileExists("updater.exe"))
|
||||
{
|
||||
// Generate hash of local updater.exe
|
||||
|
@ -22,7 +22,8 @@ namespace Components
|
||||
static std::string UpdaterArgs;
|
||||
static std::string UpdaterHash;
|
||||
static std::thread Thread;
|
||||
|
||||
static std::mutex UpdaterMutex;
|
||||
|
||||
static bool Terminate;
|
||||
static bool GetLatestUpdater();
|
||||
static bool DownloadUpdater();
|
||||
|
Loading…
Reference in New Issue
Block a user