diff --git a/sysmodules/sm/source/main.c b/sysmodules/sm/source/main.c index 073ea2c..7457f60 100644 --- a/sysmodules/sm/source/main.c +++ b/sysmodules/sm/source/main.c @@ -159,11 +159,12 @@ int main(void) { sessionData->replayCmdbuf[1] = 0xD0406401; // unregistered service or named port moveNode(sessionData, &sessionDataWaitingForServiceOrPortRegisterList, true); - svcCloseHandle(handles[id]); - handles[id] = handles[--nbHandles]; sessionData->busyClientPortHandle = 0; } } + + svcCloseHandle(handles[id]); + handles[id] = handles[--nbHandles]; } replyTarget = 0;