call exit to force shutdown in case of timeout (#726)
This commit is contained in:
parent
26578f5079
commit
731f05df38
|
|
@ -104,11 +104,7 @@ Finished:
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
STACK_STRU(strEventMsg, 256);
|
STACK_STRU(strEventMsg, 256);
|
||||||
//
|
|
||||||
// Assumption: inprocess application shutdown will be called only at process shutdown
|
|
||||||
// Based on this assumption, we just let shutdown continue and process will exit
|
|
||||||
// Log a warning for ungraceful shutdown
|
|
||||||
//
|
|
||||||
if (SUCCEEDED(strEventMsg.SafeSnwprintf(
|
if (SUCCEEDED(strEventMsg.SafeSnwprintf(
|
||||||
ASPNETCORE_EVENT_APP_SHUTDOWN_FAILURE_MSG,
|
ASPNETCORE_EVENT_APP_SHUTDOWN_FAILURE_MSG,
|
||||||
m_pConfig->QueryConfigPath()->QueryStr())))
|
m_pConfig->QueryConfigPath()->QueryStr())))
|
||||||
|
|
@ -118,6 +114,13 @@ Finished:
|
||||||
ASPNETCORE_EVENT_GRACEFUL_SHUTDOWN_FAILURE,
|
ASPNETCORE_EVENT_GRACEFUL_SHUTDOWN_FAILURE,
|
||||||
strEventMsg.QueryStr());
|
strEventMsg.QueryStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Managed layer may block the shutdown and lead to shutdown timeout
|
||||||
|
// Assumption: only one inprocess application is hosted.
|
||||||
|
// Call process exit to force shutdown
|
||||||
|
//
|
||||||
|
exit(hr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue