From 26cfb40b529250faa106bbdedd6be5751c8f3411 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 11 Mar 2021 22:20:09 -0800 Subject: [PATCH] Use zero byte reads for incoming TLS frames - We recently did some work to reduce the amount of memory allocated by SslStream on idle reads so take advantage of it here by using a new StreamPipeReader feature that makes zero byte reads on the underlying Stream. --- .../Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs b/src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs index 4abe340e4856..4a9418c97dc7 100644 --- a/src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs +++ b/src/Servers/Kestrel/Core/src/Middleware/HttpsConnectionMiddleware.cs @@ -411,7 +411,8 @@ private SslDuplexPipe CreateSslDuplexPipe(IDuplexPipe transport, MemoryPool