Esempio n. 1
0
 public void Disconnect()
 {
     if (_client == null)
     {
         return;
     }
     _client.Disconnect();
 }
Esempio n. 2
0
        public void Run(CancellationToken cancellationToken)
        {
            while (!cancellationToken.IsCancellationRequested)
            {
                if (LastPing < DateTimeOffset.Now - _client._configuration.Timeout)
                {
                    _client.Disconnect(_client._configuration.ThrowsOnTimeout);
                    return;
                }

                Thread.Sleep(5000);
            }
        }