Protect against NullReferenceException in Frame.StopStreams()

This commit is contained in:
Stephen Halter 2016-11-01 16:24:15 -07:00
parent b3aca0413c
commit 6cbbb73ca7
1 changed files with 4 additions and 2 deletions

View File

@ -159,11 +159,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
finally
{
_application.DisposeContext(context, _applicationException);
// StopStreams should be called before the end of the "if (!_requestProcessingStopping)" block
// to ensure InitializeStreams has been called.
StopStreams();
}
}
StopStreams();
if (!_keepAlive)
{
// End the connection for non keep alive as data incoming may have been thrown off