[host] no need to create a thread when running directly

This commit is contained in:
Geoffrey McRae 2017-10-31 23:30:16 +11:00
parent 8c719ff01a
commit b03254b7c2

View File

@ -43,8 +43,8 @@ int main(int argc, TCHAR *argv[])
DWORD lastError = GetLastError(); DWORD lastError = GetLastError();
if (lastError == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) if (lastError == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT)
{ {
HANDLE hThread = CreateThread(NULL, 0, ServiceWorkerThread, NULL, 0, NULL); ServiceWorkerThread(INVALID_HANDLE_VALUE);
WaitForSingleObject(hThread, INFINITE); getc(stdin);
return 0; return 0;
} }