We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31ff2d commit 2416614Copy full SHA for 2416614
src/WebJobs.Script/Host/ScriptHost.cs
@@ -757,7 +757,9 @@ private JObject ApplyHostConfiguration()
757
ConfigureLoggerFactory(recreate: true);
758
_startupLogger = _hostConfig.LoggerFactory.CreateLogger(LogCategories.Startup);
759
Logger = _hostConfig.LoggerFactory.CreateLogger(ScriptConstants.LogCategoryHostGeneral);
760
- oldLoggerFactory.Dispose();
+
761
+ // Dispose needs to be called in a fire and forget pattern as it has several sleeps and waits in the pipeline and was adding ~5 seconds to cold start.
762
+ Task.Run(() => oldLoggerFactory.Dispose());
763
764
// Allow tests to modify anything initialized by host.json
765
ScriptConfig.OnConfigurationApplied?.Invoke(ScriptConfig);
0 commit comments