mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-22 07:14:15 +08:00
Fix #266: CloseHandle close an invalid handle
This commit is contained in:
@@ -225,10 +225,10 @@ static void WINAPI ServiceMain(DWORD argc, LPTSTR* argv)
|
||||
hThread = CreateThread(NULL, 0, ServiceWrapper_WorkerThread, NULL, 0, NULL);
|
||||
if (hThread) {
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
SAFE_CLOSE_HANDLE(hThread);
|
||||
}
|
||||
|
||||
CloseHandle(g_StopEvent);
|
||||
SAFE_CLOSE_HANDLE(g_StopEvent);
|
||||
|
||||
g_ServiceStatus.dwControlsAccepted = 0;
|
||||
g_ServiceStatus.dwCurrentState = SERVICE_STOPPED;
|
||||
|
||||
Reference in New Issue
Block a user