зеркало из https://github.com/dotnet/tye.git
Allow shutting down even if startup fails. (#164)
- Running a process starts a loop directly when starting up, instead of it should yield so that StartAsync can return.
This commit is contained in:
Родитель
759e02e12a
Коммит
571c9f0a34
|
@ -123,6 +123,9 @@ namespace Microsoft.Tye.Hosting
|
|||
|
||||
async Task RunApplicationAsync(IEnumerable<(int Port, int BindingPort, string? Protocol)> ports)
|
||||
{
|
||||
// Make sure we yield before trying to start the process, this is important so we don't hang startup
|
||||
await Task.Yield();
|
||||
|
||||
var hasPorts = ports.Any();
|
||||
|
||||
var environment = new Dictionary<string, string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче