title: Correct logic to reconnect in SignalR with HubConnection
body: <p>I need to reconnect Client app (SignalR) to the Server app (SignalR) until it is connected.</p>
  
  <p>But it has <code>ConnectionState.Reconnecting</code> always... So I have no clue how to reconnect.</p>
  
  <p>I found this approach <a href="https://stackoverflow.com/questions/23375043/best-practice-for-reconnecting-signalr-2-0-net-client-to-server-hub">Best practice for reconnecting SignalR 2.0 .NET client to server hub</a>
  saying we have to recreate  <code>HubConnection</code> as a unique working approach...</p>
  
  <p>Any clue?</p>
  
  <p>The code I have is </p>
  
  <pre><code>System.Timers.Timer connectionChecker = new System.Timers.Timer(20000);
  HubConnection Connection { get; set; }
  
  private void  ConnectionChecker_ElapsedAsync(object sender, System.Timers.ElapsedEventArgs e)
  {
      if (Connection.State == ConnectionState.Disconnected)
      {
          connectionChecker.Stop();
          ForceConnectAsync().Start(); // In this method await Connection.Start();
      }
      else if (Connection.State == ConnectionState.Connecting)
      {
          // After conection lost it keeps this state ALWAYS.
          // But once server is up it still has this state.
      }
      else if (Connection.State == ConnectionState.Reconnecting)
      {
      }
      else if (Connection.State == ConnectionState.Connected)
      {
      }
  }
  </code></pre>