mirror of https://github.com/oxen-io/lokinet
fix crash on shutdown
we were calling llarp::Context::HandleSignal from a non mainloop thread when running as a win32 service. this caused issues with a non clean destruction. call our signal handler instead of llarp::Context::HandleSignal
This commit is contained in:
parent
dceef0b21e
commit
57b77fecb3
|
@ -601,6 +601,7 @@ SvcCtrlHandler(DWORD dwCtrl)
|
|||
// tell service we are stopping
|
||||
llarp::log::debug(logcat, "Windows service controller gave SERVICE_CONTROL_STOP");
|
||||
llarp::sys::service_manager->system_changed_our_state(llarp::sys::ServiceState::Stopping);
|
||||
handle_signal(SIGINT);
|
||||
return;
|
||||
|
||||
case SERVICE_CONTROL_INTERROGATE:
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace llarp::sys
|
|||
if (st == ServiceState::Stopping)
|
||||
{
|
||||
we_changed_our_state(st);
|
||||
m_Context->HandleSignal(SIGINT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue