From b03254b7c2a4c4065339c49f05555159794dd2e4 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 31 Oct 2017 23:30:16 +1100 Subject: [PATCH] [host] no need to create a thread when running directly --- host/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/main.cpp b/host/main.cpp index de6df86b..d9950f9c 100644 --- a/host/main.cpp +++ b/host/main.cpp @@ -43,8 +43,8 @@ int main(int argc, TCHAR *argv[]) DWORD lastError = GetLastError(); if (lastError == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { - HANDLE hThread = CreateThread(NULL, 0, ServiceWorkerThread, NULL, 0, NULL); - WaitForSingleObject(hThread, INFINITE); + ServiceWorkerThread(INVALID_HANDLE_VALUE); + getc(stdin); return 0; }