Skip to content

Commit 3894d70

Browse files
committed
Trying to figure out diff
1 parent ece4306 commit 3894d70

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ private async Task InnerProcessRequestsAsync<TContext>(IHttpApplication<TContext
285285
stream.Abort(new ConnectionAbortedException("Connection is shutting down."));
286286
}
287287

288-
ControlStream.Abort(new ConnectionAbortedException("Connection is shutting down."));
289-
EncoderStream.Abort(new ConnectionAbortedException("Connection is shutting down."));
290-
DecoderStream.Abort(new ConnectionAbortedException("Connection is shutting down."));
288+
ControlStream?.Abort(new ConnectionAbortedException("Connection is shutting down."));
289+
EncoderStream?.Abort(new ConnectionAbortedException("Connection is shutting down."));
290+
DecoderStream?.Abort(new ConnectionAbortedException("Connection is shutting down."));
291291

292292
await controlTask;
293293
await encoderTask;

src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ internal abstract class Http3Stream : HttpProtocol, IHttpHeadersHandler, IThread
3030

3131
private readonly Http3Connection _http3Connection;
3232
private bool _receivedHeaders;
33+
private Task _appTask = Task.CompletedTask;
34+
3335
public Pipe RequestBodyPipe { get; }
3436

3537
public Http3Stream(Http3Connection http3Connection, Http3StreamContext context)
@@ -171,9 +173,11 @@ public async Task ProcessRequestAsync<TContext>(IHttpApplication<TContext> appli
171173
{
172174
var streamError = error as ConnectionAbortedException
173175
?? new ConnectionAbortedException("The stream has completed.", error);
176+
177+
//await _appTask;
174178
try
175179
{
176-
_frameWriter.Complete();
180+
//_frameWriter.Complete();
177181
}
178182
catch
179183
{
@@ -232,7 +236,7 @@ private Task ProcessHeadersFrameAsync<TContext>(IHttpApplication<TContext> appli
232236

233237
_receivedHeaders = true;
234238

235-
Task.Run(() => base.ProcessRequestsAsync(application));
239+
_appTask = Task.Run(() => base.ProcessRequestsAsync(application));
236240
return Task.CompletedTask;
237241
}
238242

src/Servers/Kestrel/samples/Http3SampleApp/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Program
1414
{
1515
public static void Main(string[] args)
1616
{
17-
var cert = CertificateLoader.LoadFromStoreCert("JUSTIN-LAPTOP", StoreName.My.ToString(), StoreLocation.LocalMachine, true);
17+
var cert = CertificateLoader.LoadFromStoreCert("JUSTIN-LAPTOP", StoreName.My.ToString(), StoreLocation.CurrentUser, false);
1818

1919
var hostBuilder = new HostBuilder()
2020
.ConfigureLogging((_, factory) =>
@@ -33,7 +33,7 @@ public static void Main(string[] args)
3333
})
3434
.ConfigureKestrel((context, options) =>
3535
{
36-
var basePort = 4444;
36+
var basePort = 5557;
3737
options.EnableAltSvc = true;
3838
options.Listen(IPAddress.Any, basePort, listenOptions =>
3939
{

0 commit comments

Comments
 (0)