Skip to content

Commit fece6d3

Browse files
committed
fix thread exit crash
1 parent e46a0ca commit fece6d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/iohook.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,10 @@ void stop() {
391391
break;
392392
}
393393

394+
// wait for hook thread clean exit
395+
WaitForSingleObject(hook_thread, INFINITE);
396+
394397
#ifdef _WIN32
395-
// Create event handles for the thread hook.
396398
CloseHandle(hook_thread);
397399
DeleteCriticalSection(&hook_running_mutex);
398400
DeleteCriticalSection(&hook_control_mutex);

0 commit comments

Comments
 (0)