From 4a431b8fdf8e83340fdf1ee89a271d7c98c49c60 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 26 Mar 2019 23:15:37 +0100 Subject: [PATCH] Fix bug in port closed handling --- sysmodules/sm/source/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;