diff --git a/src/Surging.Core/Surging.Core.KestrelHttpServer/HttpExecutor.cs b/src/Surging.Core/Surging.Core.KestrelHttpServer/HttpExecutor.cs index b804df5d0..6921bed3a 100644 --- a/src/Surging.Core/Surging.Core.KestrelHttpServer/HttpExecutor.cs +++ b/src/Surging.Core/Surging.Core.KestrelHttpServer/HttpExecutor.cs @@ -178,6 +178,10 @@ private async Task SendRemoteInvokeResult(IMessageSender sender,string messageId if (_logger.IsEnabled(LogLevel.Error)) _logger.LogError(exception, "发送响应消息时候发生了异常。"); } + finally + { + RpcContext.RemoveContext(); + } } private static string GetExceptionMessage(Exception exception)