force stop

This commit is contained in:
2025-01-21 14:52:51 -06:00
parent 57d9884510
commit f44bb6bcfc
2 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#include "utils/polling.hpp"
#include "utils/string.hpp"
#include "utils/time.hpp"
#include "utils/timeout.hpp"
#include "utils/utils.hpp"
namespace repertory {
@ -133,7 +134,9 @@ auto winfsp_drive::winfsp_service::OnStart(ULONG /*Argc*/, PWSTR * /*Argv*/)
auto winfsp_drive::winfsp_service::OnStop() -> NTSTATUS {
REPERTORY_USES_FUNCTION_NAME();
timeout stop_timeout([]() { app_config::set_stop_requested(); }, 30s);
host_.Unmount();
stop_timeout.disable();
if (not lock_.set_mount_state(false, "", -1)) {
utils::error::raise_error(function_name, "failed to set mount state");

View File

@ -70,7 +70,7 @@ auto cache_size_mgr::expand(std::uint64_t size) -> api_error {
max_cache_size);
last_cache_size = cache_size_;
}
notify_.wait(lock, 5s);
notify_.wait_for(lock, 5s);
}
notify_.notify_all();