Skip to content

Commit ef978e4

Browse files
committed
fixup
1 parent 771d922 commit ef978e4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/Servers/Kestrel/Core/src/Middleware/Http3ConnectionMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public Task OnConnectionAsync(MultiplexedConnectionContext connectionContext)
3131
ConnectionContext = connectionContext,
3232
ServiceContext = _serviceContext,
3333
ConnectionFeatures = connectionContext.Features,
34-
MemoryPool = memoryPoolFeature.MemoryPool,
34+
MemoryPool = memoryPoolFeature?.MemoryPool ?? System.Buffers.MemoryPool<byte>.Shared,
3535
LocalEndPoint = connectionContext.LocalEndPoint as IPEndPoint,
3636
RemoteEndPoint = connectionContext.RemoteEndPoint as IPEndPoint
3737
};

src/Servers/Kestrel/Core/src/Middleware/HttpConnectionMiddleware.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System.Buffers;
54
using System.Net;
65
using System.Threading.Tasks;
76
using Microsoft.AspNetCore.Connections;
@@ -44,6 +43,5 @@ public Task OnConnectionAsync(ConnectionContext connectionContext)
4443

4544
return connection.ProcessRequestsAsync(_application);
4645
}
47-
4846
}
4947
}

0 commit comments

Comments
 (0)