diff options
| -rw-r--r-- | src/core/hle/service/server_manager.cpp | 9 |
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() { | |||
| 256 | 256 | ||
| 257 | // Wait for a signal. | 257 | // Wait for a signal. |
| 258 | s32 out_index{-1}; | 258 | s32 out_index{-1}; |
| 259 | R_TRY(Kernel::KSynchronizationObject::Wait(m_system.Kernel(), &out_index, wait_objs.data(), | 259 | R_TRY_CATCH(Kernel::KSynchronizationObject::Wait(m_system.Kernel(), &out_index, |
| 260 | num_objs, -1)); | 260 | wait_objs.data(), num_objs, -1)) { |
| 261 | R_CATCH(Kernel::ResultSessionClosed) { | ||
| 262 | // On session closed, index is updated and we don't want to return an error. | ||
| 263 | } | ||
| 264 | } | ||
| 265 | R_END_TRY_CATCH; | ||
| 261 | ASSERT(out_index >= 0 && out_index < num_objs); | 266 | ASSERT(out_index >= 0 && out_index < num_objs); |
| 262 | 267 | ||
| 263 | // Set the output index. | 268 | // Set the output index. |