Close the handle for the ticker thread (#5604)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 10 Nov 2011 16:36:39 +0000 (16:36 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 11 Nov 2011 12:49:48 +0000 (12:49 +0000)
rts/win32/Ticker.c

index 929e6f4..1c45482 100644 (file)
@@ -153,7 +153,8 @@ exitTicker (rtsBool wait)
            if (!GetExitCodeThread(tickThread, &exitCode)) {
                return;
            }
-           if (exitCode != STILL_ACTIVE) {
+            CloseHandle(tickThread);
+            if (exitCode != STILL_ACTIVE) {
                tickThread = INVALID_HANDLE_VALUE;
                if ( hStopEvent != INVALID_HANDLE_VALUE ) {
                    CloseHandle(hStopEvent);