summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2024-01-15 19:50:43 +0100
committerGitHub <noreply@github.com>2024-01-15 19:50:43 +0100
commitdb3a6075f58fd3b4d3de9f2a472c29b57d6e1321 (patch)
treeff03cd23c0bec177c4770d0511024ff84bc5b451 /src
parentMerge pull request #12667 from t895/version-info (diff)
parentserver_manager: respond to session close correctly (diff)
downloadyuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar.gz
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar.bz2
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar.lz
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar.xz
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.tar.zst
yuzu-db3a6075f58fd3b4d3de9f2a472c29b57d6e1321.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/server_manager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp
index 15edb23e0..8ef49387d 100644
--- a/src/core/hle/service/server_manager.cpp
+++ b/src/core/hle/service/server_manager.cpp
@@ -256,8 +256,13 @@ Result ServerManager::WaitAndProcessImpl() {
// Wait for a signal.
s32 out_index{-1};
- R_TRY(Kernel::KSynchronizationObject::Wait(m_system.Kernel(), &out_index, wait_objs.data(),
- num_objs, -1));
+ R_TRY_CATCH(Kernel::KSynchronizationObject::Wait(m_system.Kernel(), &out_index,
+ wait_objs.data(), num_objs, -1)) {
+ R_CATCH(Kernel::ResultSessionClosed) {
+ // On session closed, index is updated and we don't want to return an error.
+ }
+ }
+ R_END_TRY_CATCH;
ASSERT(out_index >= 0 && out_index < num_objs);
// Set the output index.