mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-18 04:42:45 +01:00
server_manager: respond to session close correctly
This commit is contained in:
parent
82b58668ed
commit
200b371d13
1 changed files with 7 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue