public void OnTimedEvent(Object sender, ElapsedEventArgs args)
 {
     _timer = null;
     _client.CancelConnection();
     _timersMap.CancelConnectTimer();
     return;
 }
        public void OnTimedEvent(Object sender, ElapsedEventArgs args)
        {
            _timer = null;
            if (retriesLeft.HasValue)
            {
                retriesLeft--;
                if (retriesLeft == 0)
                {
                    _timersMap.CancelConnectTimer();
                    return;
                }
            }

            _client.Send(_message);
            _timersMap.RefreshTimer(this);
        }