Browse Source

Merge pull request #12610 from liamwhite/reply-and-dont-receive

server_manager: respond to session close correctly
pull/15/merge
Charles Lombardo 2 years ago
committed by GitHub
parent
commit
db3a6075f5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/core/hle/service/server_manager.cpp

9
src/core/hle/service/server_manager.cpp

@ -256,8 +256,13 @@ Result ServerManager::WaitAndProcessImpl() {
// Wait for a signal. // Wait for a signal.
s32 out_index{-1}; 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); ASSERT(out_index >= 0 && out_index < num_objs);
// Set the output index. // Set the output index.

Loading…
Cancel
Save