mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-11-30 17:18:42 +00:00
nit: ensure shutdown event is raised before thread join
This commit is contained in:
1 parent
f1285e63f7
commit
033f9bc40f
1 file changed
+4
@@ -1507,6 +1507,10 @@ namespace platf {
|
||||
~deinit_t() override {
|
||||
try {
|
||||
if (portal::xdg_worker.joinable()) {
|
||||
// Make sure the worker's response loop sees shutdown before we block on join().
|
||||
if (mail::man) {
|
||||
mail::man->event<bool>(mail::shutdown)->raise(true);
|
||||
}
|
||||
portal::xdg_worker.join();
|
||||
}
|
||||
} catch (const std::exception &err) {
|
||||
|
||||
Reference in new issue
Block a user