public void Stop() { if (this.Running && this.host != null) { this.Running = false; this.host.Dispose(); Servers.Remove(this); _reloader.StopWatchingFile(FileName); } }
public void Stop() { if (this.Running && this.host != null) { this.Running = false; this.host.StopAsync().ConfigureAwait(false); DashboardService.Dispose(); Servers.Remove(this); _reloader.StopWatchingFile(FileName); } }
public void Stop() { if (this.Running && this.host != null) { this.Running = false; this.host.StopAsync(TimeSpan.FromSeconds(1)).Wait(); DashboardService.Dispose(); Servers.Remove(this); _reloader.StopWatchingFile(FileName); } }