Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 8c0eb78

Browse files
author
Cesar Blum Silveira
committed
Don't reset frame state when connection is aborted (#1103).
1 parent 0312da7 commit 8c0eb78

File tree

1 file changed

+5
-2
lines changed
  • src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http

1 file changed

+5
-2
lines changed

src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/FrameOfT.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,11 @@ public override async Task RequestProcessingAsync()
141141
}
142142
}
143143

144-
// Don't lose request rejection state
145-
if (!_requestRejected)
144+
// Don't reset frame state if we're exiting the loop. This avoids losing request rejection
145+
// information (for 4xx response), and prevents ObjectDisposedException on HTTPS (ODEs
146+
// will be thrown if PrepareRequest is not null and references objects disposed on connection
147+
// close - see https://github.com/aspnet/KestrelHttpServer/issues/1103#issuecomment-250237677).
148+
if (!_requestProcessingStopping)
146149
{
147150
Reset();
148151
}

0 commit comments

Comments
 (0)