private void TryConnectionTimer_TryNow(object sender, ElapsedEventArgs e) { if (!IsConnected && currentTryConnectionCount < MaxTryConnectionCount) { currentTryConnectionCount++; try { this.Connection.Open(); } catch (Exception) { } } else { this.Stop(); if (!IsConnected) { ConnectionTimeoutEvent?.Invoke(); } this.currentTryConnectionCount = 0; } }
protected override void OnEvent(ConnectionTimeoutEvent @event) { }