public async Task StopAsync(CancellationToken cancellationToken) { _logger.LogInformation("Stopping metric service"); await _server.StopAsync(); _server.Dispose(); }
public async Task StopAsync(CancellationToken cancellationToken) { using (_metricServer) { Console.WriteLine("Shutting down metric server"); await _metricServer.StopAsync(); Console.WriteLine("Done shutting down metric server"); } }
public async Task StopAsync(CancellationToken cancellationToken) { using (_metricServer) { _logger.LogDebug("Shutting down metric server"); await _metricServer.StopAsync(); _logger.LogDebug("Done shutting down metric server"); } }
public async Task StopAsync(CancellationToken cancellationToken) { _logger.Debug("Stopping metrics server"); try { await _server.StopAsync(); } catch (Exception ex) { _logger.Error("Error stopping metrics server", ex); } }