force stop
This commit is contained in:
@ -40,6 +40,7 @@
|
|||||||
#include "utils/polling.hpp"
|
#include "utils/polling.hpp"
|
||||||
#include "utils/string.hpp"
|
#include "utils/string.hpp"
|
||||||
#include "utils/time.hpp"
|
#include "utils/time.hpp"
|
||||||
|
#include "utils/timeout.hpp"
|
||||||
#include "utils/utils.hpp"
|
#include "utils/utils.hpp"
|
||||||
|
|
||||||
namespace repertory {
|
namespace repertory {
|
||||||
@ -133,7 +134,9 @@ auto winfsp_drive::winfsp_service::OnStart(ULONG /*Argc*/, PWSTR * /*Argv*/)
|
|||||||
auto winfsp_drive::winfsp_service::OnStop() -> NTSTATUS {
|
auto winfsp_drive::winfsp_service::OnStop() -> NTSTATUS {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
|
timeout stop_timeout([]() { app_config::set_stop_requested(); }, 30s);
|
||||||
host_.Unmount();
|
host_.Unmount();
|
||||||
|
stop_timeout.disable();
|
||||||
|
|
||||||
if (not lock_.set_mount_state(false, "", -1)) {
|
if (not lock_.set_mount_state(false, "", -1)) {
|
||||||
utils::error::raise_error(function_name, "failed to set mount state");
|
utils::error::raise_error(function_name, "failed to set mount state");
|
||||||
|
@ -70,7 +70,7 @@ auto cache_size_mgr::expand(std::uint64_t size) -> api_error {
|
|||||||
max_cache_size);
|
max_cache_size);
|
||||||
last_cache_size = cache_size_;
|
last_cache_size = cache_size_;
|
||||||
}
|
}
|
||||||
notify_.wait(lock, 5s);
|
notify_.wait_for(lock, 5s);
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_.notify_all();
|
notify_.notify_all();
|
||||||
|
Reference in New Issue
Block a user