aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/server_manager.cpp
diff options
context:
space:
mode:
authorViktor Szépe <viktor@szepe.net>2024-01-16 00:09:00 +0000
committerViktor Szépe <viktor@szepe.net>2024-01-16 00:09:00 +0000
commit90ab89a0b0174f8df559b79dc06a03479d959f93 (patch)
tree3d11a790e44945e309f0e68f5332b33b42e72bbb /src/core/hle/service/server_manager.cpp
parent6531ad56a6d701d84d5ede5f155c5bd91fa70a69 (diff)
parentc683ec2bcb71db6db504d4f1161a7830a8c42774 (diff)
Merge remote-tracking branch 'origin/master' into typos3
Diffstat (limited to 'src/core/hle/service/server_manager.cpp')
-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.