Fixed issue with Discord RPC not updating presence during shutdown (#189)
This commit is contained in:
parent
5df1c5ae6d
commit
7c41a8ec19
1 changed files with 2 additions and 1 deletions
|
@ -89,10 +89,11 @@ public:
|
||||||
keepRunning.store(true);
|
keepRunning.store(true);
|
||||||
ioThread = std::thread([&]() {
|
ioThread = std::thread([&]() {
|
||||||
const std::chrono::duration<int64_t, std::milli> maxWait{500LL};
|
const std::chrono::duration<int64_t, std::milli> maxWait{500LL};
|
||||||
while (keepRunning.load()) {
|
|
||||||
Discord_UpdateConnection();
|
Discord_UpdateConnection();
|
||||||
|
while (keepRunning.load()) {
|
||||||
std::unique_lock<std::mutex> lock(waitForIOMutex);
|
std::unique_lock<std::mutex> lock(waitForIOMutex);
|
||||||
waitForIOActivity.wait_for(lock, maxWait);
|
waitForIOActivity.wait_for(lock, maxWait);
|
||||||
|
Discord_UpdateConnection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue