diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs index d8695f6efb..5e94d3e47f 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/OutputProducer.cs @@ -51,9 +51,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { if (_completed) { - // TODO: Get actual notification when the consumer stopped from Pipes, - // so we know if the socket is fully closed and why (for logging exceptions); - _log.ConnectionDisconnectedWrite(_connectionId, buffer.Count, ex: null); return TaskCache.CompletedTask; } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/IKestrelTrace.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/IKestrelTrace.cs index 2f577007b4..680fecc7e2 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/IKestrelTrace.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/IKestrelTrace.cs @@ -22,8 +22,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure void RequestProcessingError(string connectionId, Exception ex); - void ConnectionDisconnectedWrite(string connectionId, int count, Exception ex); - void ConnectionHeadResponseBodyWrite(string connectionId, long count); void NotAllConnectionsClosedGracefully(); diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/KestrelTrace.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/KestrelTrace.cs index e0a2a018aa..fac8fa080f 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Infrastructure/KestrelTrace.cs @@ -33,9 +33,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal private static readonly Action _applicationError = LoggerMessage.Define(LogLevel.Error, 13, @"Connection id ""{ConnectionId}"", Request id ""{TraceIdentifier}"": An unhandled exception was thrown by the application."); - private static readonly Action _connectionDisconnectedWrite = - LoggerMessage.Define(LogLevel.Debug, 15, @"Connection id ""{ConnectionId}"" write of ""{count}"" bytes to disconnected client."); - private static readonly Action _notAllConnectionsClosedGracefully = LoggerMessage.Define(LogLevel.Debug, 16, "Some connections failed to close gracefully during server shutdown."); @@ -99,11 +96,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal _applicationError(_logger, connectionId, traceIdentifier, ex); } - public virtual void ConnectionDisconnectedWrite(string connectionId, int count, Exception ex) - { - _connectionDisconnectedWrite(_logger, connectionId, count, ex); - } - public virtual void ConnectionHeadResponseBodyWrite(string connectionId, long count) { _connectionHeadResponseBodyWrite(_logger, connectionId, count, null); diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Mocks/MockTrace.cs b/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Mocks/MockTrace.cs index 6c60495590..87be9cde4d 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Mocks/MockTrace.cs +++ b/test/Microsoft.AspNetCore.Server.Kestrel.Performance/Mocks/MockTrace.cs @@ -14,7 +14,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance public IDisposable BeginScope(TState state) => null; public void ConnectionBadRequest(string connectionId, BadHttpRequestException ex) { } public void ConnectionDisconnect(string connectionId) { } - public void ConnectionDisconnectedWrite(string connectionId, int count, Exception ex) { } public void ConnectionError(string connectionId, Exception ex) { } public void ConnectionHeadResponseBodyWrite(string connectionId, long count) { } public void ConnectionKeepAlive(string connectionId) { }