From ad00f20a2310d8920ede3e127d5a7296e916ee34 Mon Sep 17 00:00:00 2001 From: Alex Kursov Date: Tue, 23 Jul 2019 20:54:42 -0700 Subject: [PATCH] Fix tracing wrapper. (#966) --- .../Middleware/Pipeline/OcelotPipelineBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ocelot/Middleware/Pipeline/OcelotPipelineBuilderExtensions.cs b/src/Ocelot/Middleware/Pipeline/OcelotPipelineBuilderExtensions.cs index 2c0b14ed..3dbc4a48 100644 --- a/src/Ocelot/Middleware/Pipeline/OcelotPipelineBuilderExtensions.cs +++ b/src/Ocelot/Middleware/Pipeline/OcelotPipelineBuilderExtensions.cs @@ -79,12 +79,12 @@ namespace Ocelot.Middleware.Pipeline var diagnosticListener = (DiagnosticListener)app.ApplicationServices.GetService(typeof(DiagnosticListener)); var middlewareName = ocelotDelegate.Target.GetType().Name; - OcelotRequestDelegate wrapped = context => + OcelotRequestDelegate wrapped = async context => { try { Write(diagnosticListener, "Ocelot.MiddlewareStarted", middlewareName, context); - return ocelotDelegate(context); + await ocelotDelegate(context); } catch (Exception ex) {