Using block in the externally controlled example (#1422)

This commit is contained in:
Luke Latham 2018-05-16 09:26:55 -05:00 committed by Chris Ross
parent 5227de9a31
commit 0b6dbab37a
1 changed files with 4 additions and 2 deletions

View File

@ -38,8 +38,10 @@ namespace SampleStartups
public async Task StopAsync()
{
await _host.StopAsync(TimeSpan.FromSeconds(5));
_host.Dispose();
using (_host)
{
await _host.StopAsync(TimeSpan.FromSeconds(5));
}
}
public void AddUrl(string url)