From 3c895a54973fb13588555da3df280bc8c41d80e6 Mon Sep 17 00:00:00 2001 From: Lee Fitchett Date: Tue, 25 Aug 2020 09:07:11 -0700 Subject: [PATCH] Remove await from support bundle autofac construction --- .../modules/TwinConfigSourceModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/modules/TwinConfigSourceModule.cs b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/modules/TwinConfigSourceModule.cs index 06811a7c47f..530f9e503f0 100644 --- a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/modules/TwinConfigSourceModule.cs +++ b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/modules/TwinConfigSourceModule.cs @@ -117,10 +117,10 @@ protected override void Load(ContainerBuilder builder) // Task - SupportBundleRequestHandler builder.Register( - async c => + c => { - await Task.Yield(); - return new SupportBundleRequestHandler(c.Resolve().GetSupportBundle, c.Resolve(), this.iotHubHostName) as IRequestHandler; + IRequestHandler handler = new SupportBundleRequestHandler(c.Resolve().GetSupportBundle, c.Resolve(), this.iotHubHostName); + return Task.FromResult(handler); }) .As>() .SingleInstance();