some fix for handling configuration change and recycling (#539)
This commit is contained in:
parent
9c4a784891
commit
d61a4ca89f
|
|
@ -28,8 +28,8 @@ public:
|
|||
);
|
||||
|
||||
GLOBAL_NOTIFICATION_STATUS
|
||||
OnGlobalConfigurationChange(
|
||||
_In_ IGlobalConfigurationChangeProvider * pProvider
|
||||
OnGlobalApplicationStop(
|
||||
_In_ IHttpApplicationStopProvider * pProvider
|
||||
);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -235,7 +235,14 @@ APPLICATION_MANAGER::ShutDown()
|
|||
|
||||
// clean up the hash table so that the application will be informed on shutdown
|
||||
m_pApplicationInfoHash->Clear();
|
||||
|
||||
ReleaseSRWLockExclusive(&m_srwLock);
|
||||
}
|
||||
|
||||
// stop filewatcher monitoring thread
|
||||
if (m_pFileWatcher != NULL)
|
||||
{
|
||||
delete m_pFileWatcher;
|
||||
m_pFileWatcher = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,8 +201,9 @@ HRESULT
|
|||
}
|
||||
|
||||
hr = pModuleInfo->SetGlobalNotifications(
|
||||
pGlobalModule,
|
||||
GL_CONFIGURATION_CHANGE | GL_STOP_LISTENING);
|
||||
pGlobalModule,
|
||||
GL_APPLICATION_STOP | // Configuration change trigers IIS application stop
|
||||
GL_STOP_LISTENING); // worker process stop or recycle
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ ASPNET_CORE_GLOBAL_MODULE::OnGlobalStopListening(
|
|||
// Recycled the corresponding core app if its configuration changed
|
||||
//
|
||||
GLOBAL_NOTIFICATION_STATUS
|
||||
ASPNET_CORE_GLOBAL_MODULE::OnGlobalConfigurationChange(
|
||||
_In_ IGlobalConfigurationChangeProvider * pProvider
|
||||
ASPNET_CORE_GLOBAL_MODULE::OnGlobalApplicationStop(
|
||||
_In_ IHttpApplicationStopProvider * pProvider
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(pProvider);
|
||||
|
||||
// Retrieve the path that has changed.
|
||||
PCWSTR pwszChangePath = pProvider->GetChangePath();
|
||||
IHttpApplication* pApplication = pProvider->GetApplication();
|
||||
|
||||
PCWSTR pwszChangePath = pApplication->GetAppConfigPath();
|
||||
|
||||
// Test for an error.
|
||||
if (NULL != pwszChangePath &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue