This commit is contained in:
Pavel Krymets 2018-07-05 09:01:47 -07:00
parent 3bdb33ccd4
commit b280597c68
2 changed files with 2 additions and 1 deletions

View File

@ -205,6 +205,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
return null;
}
// Synchronize access to native methods that might run in parallel with IO loops
lock (_contextLock)
{
return NativeMethods.HttpTryGetServerVariable(_pInProcessHandler, variableName, out var value) ? value : null;

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core.IO
public AsyncIOEngine(object contextSync, IntPtr handler)
{
this._contextSync = contextSync;
_contextSync = contextSync;
_handler = handler;
}