From 7c41a8ec1969b9b4b0c2360c6b632ebd16a92b69 Mon Sep 17 00:00:00 2001 From: Sleepy Flower Girl Date: Thu, 7 Jun 2018 19:10:40 -0400 Subject: [PATCH] Fixed issue with Discord RPC not updating presence during shutdown (#189) --- src/discord_rpc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discord_rpc.cpp b/src/discord_rpc.cpp index dedb3f1..2e44c93 100644 --- a/src/discord_rpc.cpp +++ b/src/discord_rpc.cpp @@ -89,10 +89,11 @@ public: keepRunning.store(true); ioThread = std::thread([&]() { const std::chrono::duration maxWait{500LL}; + Discord_UpdateConnection(); while (keepRunning.load()) { - Discord_UpdateConnection(); std::unique_lock lock(waitForIOMutex); waitForIOActivity.wait_for(lock, maxWait); + Discord_UpdateConnection(); } }); }