File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/RequestHandler/outofprocess Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,12 @@ FORWARDING_HANDLER::OnExecuteRequestHandler()
9797 STACK_STRU (strUrl, 2048 );
9898 STACK_STRU (struEscapedUrl, 2048 );
9999
100+ //
101+ // Take a reference so that object does not go away as a result of
102+ // async completion.
103+ //
104+ ReferenceRequestHandler ();
105+
100106 // override Protocol related config from aspNetCore config
101107 pProtocol->OverrideConfig (m_pApplication->QueryConfig ());
102108
@@ -354,6 +360,12 @@ FORWARDING_HANDLER::OnExecuteRequestHandler()
354360 ReleaseSRWLockShared (&m_RequestLock);
355361 DBG_ASSERT (TlsGetValue (g_dwTlsIndex) == NULL );
356362 }
363+
364+ DereferenceRequestHandler ();
365+ //
366+ // Do not use this object after dereferencing it, it may be gone.
367+ //
368+
357369 return retVal;
358370}
359371
You can’t perform that action at this time.
0 commit comments