From bc2e1a53cbc7dd10c83bb7d69736cb9e750d6571 Mon Sep 17 00:00:00 2001 From: Frederik Juul Christiani Date: Tue, 13 Jun 2017 11:23:08 +0200 Subject: [PATCH] shell_integration/windows: Create _newQueries as a non-signaled auto-reset event. Since ResetEvent() is never called, the call to WaitForMultipleObjects() can always return immediately once the event has been signaled. --- shell_integration/windows/OCUtil/RemotePathChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell_integration/windows/OCUtil/RemotePathChecker.cpp b/shell_integration/windows/OCUtil/RemotePathChecker.cpp index 16449ddc0..4a13c1cd5 100644 --- a/shell_integration/windows/OCUtil/RemotePathChecker.cpp +++ b/shell_integration/windows/OCUtil/RemotePathChecker.cpp @@ -175,7 +175,7 @@ RemotePathChecker::RemotePathChecker() : _stop(false) , _watchedDirectories(make_shared>()) , _connected(false) - , _newQueries(CreateEvent(NULL, true, true, NULL)) + , _newQueries(CreateEvent(NULL, FALSE, FALSE, NULL)) , _thread([this]{ this->workerThreadLoop(); }) { } -- 2.30.2