From: Frederik Juul Christiani Date: Tue, 13 Jun 2017 09:23:08 +0000 (+0200) Subject: shell_integration/windows: Create _newQueries as a non-signaled auto-reset event. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~710^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fae178f70ba3743a41a7981270c28c038acba6e7;p=nextcloud-desktop.git 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. --- 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(); }) { }