fix #2041 - Server restart post module install fails with null exception
This commit is contained in:
parent
b80fe428ac
commit
fd89254d5a
@ -266,17 +266,27 @@ namespace Oqtane.Infrastructure
|
||||
jobs.UpdateJob(job);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// error updating the job
|
||||
}
|
||||
|
||||
// stop called without start
|
||||
if (_executingTask == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// force cancellation of the executing method
|
||||
_cancellationTokenSource.Cancel();
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Task.WhenAny(_executingTask, Task.Delay(Timeout.Infinite, cancellationToken));
|
||||
// wait until the task completes or the stop token triggers
|
||||
await Task.WhenAny(_executingTask, Task.Delay(Timeout.Infinite, cancellationToken)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,7 @@ namespace Oqtane
|
||||
services.AddLocalization(options => options.ResourcesPath = "Resources");
|
||||
|
||||
services.AddOptions<List<Database>>().Bind(Configuration.GetSection(SettingKeys.AvailableDatabasesSection));
|
||||
services.Configure<HostOptions>(opts => opts.ShutdownTimeout = TimeSpan.FromSeconds(10)); // increase from default of 5 seconds
|
||||
|
||||
services.AddServerSideBlazor()
|
||||
.AddCircuitOptions(options =>
|
||||
|
Reference in New Issue
Block a user