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();