예제 #1
0
        private async Task RefreshHostForever(CancellationToken shutdownToken)
        {
            while (shutdownToken.IsCancellationRequested == false)
            {
                try
                {
                    await Load().ConfigureAwait(false);
                }
                catch (Exception e)
                {
                    _log.Critical("Failed to load endpoints from Consul", e);
                }

                await _dateTime.Delay(_config.ReloadInterval.Value).ConfigureAwait(false);
            }
        }