Skip to content

Commit ecbad63

Browse files
committed
Staging work
1 parent 323fd98 commit ecbad63

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ internal async Task InnerProcessStreamsAsync<TContext>(IHttpApplication<TContext
237237
// Don't create Encoder and Decoder as they aren't used now.
238238
Exception? error = null;
239239

240+
// TODO should we await the control stream task?
240241
var controlTask = CreateControlStream(application);
241242

242243
_timeoutControl.SetTimeout(Limits.KeepAliveTimeout.Ticks, TimeoutReason.KeepAlive);

src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionContext.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Experimental.Quic.Intern
1414
{
1515
internal class QuicConnectionContext : TransportMultiplexedConnection, IProtocolErrorCodeFeature
1616
{
17-
private QuicConnection _connection;
17+
private readonly QuicConnection _connection;
1818
private readonly QuicTransportContext _context;
1919
private readonly IQuicTrace _log;
2020
private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
@@ -90,13 +90,18 @@ public override void Abort(ConnectionAbortedException abortReason)
9090
context.Start();
9191
return context;
9292
}
93-
catch (QuicException ex)
93+
catch (QuicConnectionAbortedException ex)
9494
{
95-
// Accept on graceful close throws an aborted exception rather than returning null.
96-
95+
// Shutdown initiated by peer, abortive.
9796
// TODO cancel CTS here?
9897
_log.LogDebug($"Accept loop ended with exception: {ex.Message}");
9998
}
99+
catch (QuicOperationAbortedException)
100+
{
101+
// Shutdown initiated by us
102+
103+
// Allow for graceful closure.
104+
}
100105

101106
return null;
102107
}

0 commit comments

Comments
 (0)