Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HostFactoryResolver - Increase default timeout to thirty seconds #61621

Merged
merged 8 commits into from
Nov 17, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal sealed class HostFactoryResolver
public const string CreateHostBuilder = nameof(CreateHostBuilder);

// The amount of time we wait for the diagnostic source events to fire
private static readonly TimeSpan s_defaultWaitTimeout = Debugger.IsAttached ? Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(5);
private static readonly TimeSpan s_defaultWaitTimeout = Debugger.IsAttached ? Timeout.InfiniteTimeSpan : TimeSpan.FromMinutes(1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we improve the error message to make it clear that there was a timeout, are we worried that people will just kill the migration before seeing the error if we make this a full minute?

Copy link
Member Author

@maryamariyan maryamariyan Nov 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updates exception messaging and changed it to 30 seconds, assuming we would keep the environment variable option.


public static Func<string[], TWebHost>? ResolveWebHostFactory<TWebHost>(Assembly assembly)
{
Expand Down