File tree 4 files changed +17
-9
lines changed
4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ class ASPNET_CORE_GLOBAL_MODULE : public CGlobalModule
28
28
);
29
29
30
30
GLOBAL_NOTIFICATION_STATUS
31
- OnGlobalConfigurationChange (
32
- _In_ IGlobalConfigurationChangeProvider * pProvider
31
+ OnGlobalApplicationStop (
32
+ _In_ IHttpApplicationStopProvider * pProvider
33
33
);
34
34
35
35
private:
Original file line number Diff line number Diff line change @@ -235,7 +235,14 @@ APPLICATION_MANAGER::ShutDown()
235
235
236
236
// clean up the hash table so that the application will be informed on shutdown
237
237
m_pApplicationInfoHash->Clear ();
238
+
238
239
ReleaseSRWLockExclusive (&m_srwLock);
239
240
}
240
241
242
+ // stop filewatcher monitoring thread
243
+ if (m_pFileWatcher != NULL )
244
+ {
245
+ delete m_pFileWatcher;
246
+ m_pFileWatcher = NULL ;
247
+ }
241
248
}
Original file line number Diff line number Diff line change @@ -201,8 +201,9 @@ HRESULT
201
201
}
202
202
203
203
hr = pModuleInfo->SetGlobalNotifications (
204
- pGlobalModule,
205
- GL_CONFIGURATION_CHANGE | GL_STOP_LISTENING);
204
+ pGlobalModule,
205
+ GL_APPLICATION_STOP | // Configuration change trigers IIS application stop
206
+ GL_STOP_LISTENING); // worker process stop or recycle
206
207
207
208
if (FAILED (hr))
208
209
{
Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ ASPNET_CORE_GLOBAL_MODULE::OnGlobalStopListening(
34
34
// Recycled the corresponding core app if its configuration changed
35
35
//
36
36
GLOBAL_NOTIFICATION_STATUS
37
- ASPNET_CORE_GLOBAL_MODULE::OnGlobalConfigurationChange (
38
- _In_ IGlobalConfigurationChangeProvider * pProvider
37
+ ASPNET_CORE_GLOBAL_MODULE::OnGlobalApplicationStop (
38
+ _In_ IHttpApplicationStopProvider * pProvider
39
39
)
40
40
{
41
- UNREFERENCED_PARAMETER (pProvider);
42
-
43
41
// Retrieve the path that has changed.
44
- PCWSTR pwszChangePath = pProvider->GetChangePath ();
42
+ IHttpApplication* pApplication = pProvider->GetApplication ();
43
+
44
+ PCWSTR pwszChangePath = pApplication->GetAppConfigPath ();
45
45
46
46
// Test for an error.
47
47
if (NULL != pwszChangePath &&
You can’t perform that action at this time.
0 commit comments