Example #1
0
        protected override void Ready()
        {
            base.Ready();
            Receive <RestartClient>(_ =>
            {
                Log.Debug("Restarting consul client...");

                consul.Dispose();
                consul = CreateConsulClient(settings);
            });
        }
 public void Dispose()
 {
     if (!_disposed)
     {
         client?.Dispose();
         _disposed = true;
     }
 }
Example #3
0
 public void Dispose()
 {
     _client.Dispose();
 }
 protected override void PostStop()
 {
     base.PostStop();
     consul.Dispose();
 }
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
 /// </summary>
 /// <returns>
 /// A task that represents the asynchronous dispose operation.
 /// </returns>
 public ValueTask DisposeAsync()
 {
     _client.Dispose();
     return(new ValueTask());
 }