Fixed issue with Discord RPC not updating presence during shutdown (#189)

This commit is contained in:
Sleepy Flower Girl 2018-06-07 19:10:40 -04:00 committed by Mason Sciotti
parent 5df1c5ae6d
commit 7c41a8ec19

View file

@ -89,10 +89,11 @@ public:
keepRunning.store(true);
ioThread = std::thread([&]() {
const std::chrono::duration<int64_t, std::milli> maxWait{500LL};
Discord_UpdateConnection();
while (keepRunning.load()) {
Discord_UpdateConnection();
std::unique_lock<std::mutex> lock(waitForIOMutex);
waitForIOActivity.wait_for(lock, maxWait);
Discord_UpdateConnection();
}
});
}