shell_integration/windows: Create _newQueries as a non-signaled auto-reset event.
authorFrederik Juul Christiani <frederik@vikingsoft.eu>
Tue, 13 Jun 2017 09:23:08 +0000 (11:23 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Wed, 14 Jun 2017 10:14:22 +0000 (12:14 +0200)
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

index 16449ddc014fef043baadb294d09ac776b231021..4a13c1cd56323ec6a5a80cae319086e806d07300 100644 (file)
@@ -175,7 +175,7 @@ RemotePathChecker::RemotePathChecker()
     : _stop(false)
     , _watchedDirectories(make_shared<const vector<wstring>>())
     , _connected(false)
-    , _newQueries(CreateEvent(NULL, true, true, NULL))
+    , _newQueries(CreateEvent(NULL, FALSE, FALSE, NULL))
     , _thread([this]{ this->workerThreadLoop(); })
 {
 }