accept preshutdown
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
blackbeard420 2024-01-03 17:52:35 -05:00
parent d6f3c13816
commit 9f24dbf1e0
Signed by: blackbeard420
GPG Key ID: 88C719E09CDDA4A5

View File

@ -63,7 +63,7 @@ mod winserv {
}
ServiceControl::Preshutdown => {
sender.send_quit("ouch or die").unwrap();
sender.send_quit("ouch or die (sys reboot)").unwrap();
*r2.lock().unwrap() = false;
ServiceControlHandlerResult::NoError
}
@ -79,7 +79,7 @@ mod winserv {
.set_service_status(ServiceStatus {
service_type: SERVICE_TYPE,
current_state: ServiceState::Running,
controls_accepted: ServiceControlAccept::STOP,
controls_accepted: ServiceControlAccept::STOP | ServiceControlAccept::PRESHUTDOWN,
exit_code: ServiceExitCode::Win32(0),
checkpoint: 0,
wait_hint: Duration::default(),