Browse Source

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.
davidfowl/dependencies
David Fowler 7 years ago
committed by GitHub
parent
commit
571c9f0a34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Microsoft.Tye.Hosting/ProcessRunner.cs

3
src/Microsoft.Tye.Hosting/ProcessRunner.cs

@ -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>

Loading…
Cancel
Save