title: Signalr reconnects forever after IIS AppPool recycles
body: <p>I'm using signalR 2.2.1.
  When the IIS apppool recycles, if there's an open connection, the client tries forever to reconnect (with the same ConnectionId).</p>
  
  <p>A sample of the SignalR client log (for every reconnect attempt):</p>
  
  <blockquote>
    <p>SignalR: webSockets reconnecting.</p>
    
    <p>SignalR: Connecting to websocket endpoint
    'wss://IP/hub/signalr/reconnect?transport=webSockets&amp;groupsToken=8FWHT%2FO774vZYA7IYz8%2F%2FX9zMLswzG98KhGbM83kK5xh%2BVVbqQPv1wQYQWvzTygSQHj9QsDyoHL1U8eQ1fV18QQQ%2FZqRewQEpU4rkRZRE0CE%2B2oDk9RQghCT%2BxlV0KFcl%2FUpuepwX0E5w4xhSScH%2BFkxFvL4vtPIpwYVzInIaW%2BICRWRHrNfjKm9RLiC3a%2F3jcYi1AUeFBJsDnY%2F9bZBrA%3D%3D&amp;messageId=d-C69C65D6-H%2C0%7CI%2C0%7CJ%2C4%7CK%2C0%7CL%2C0%7CM%2C0&amp;clientProtocol=1.5&amp;connectionToken=%2FivgB%2Bcy%2FE1%2B%2BTFj5eCqTEZNzr%2FVuIzdJQVbUypK1YjrZur80uPbufYxGT%2BDC%2FWhsHXZJgUpkI2IyJ8Y8wnuOEAID%2F9kOnSyllFpCQHDN6VRTdMEaU%2F0Kdh4yX2vqKh%2F&amp;connectionData=%5B%7B%22name%22%3A%22hub%22%7D%5D&amp;tid=0'.</p>
    
    <p>SignalR: Closing the Websocket.</p>
    
    <p>SignalR: Websocket opened.</p>
    
    <p>SignalR: Unclean disconnect from websocket: [no reason given].</p>
  </blockquote>
  
  <p>I did a workaround - when reconnected callback is being called - to stop and start the connection (just start won't work):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $.connection.hub.reconnected(function() {
          console.log("reconnected");
          $.connection.hub.stop();
          $.connection.hub.start();
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>But then re connection is being handled by me, and I guess that's not a good idea.</p>
  
  <p>Any other ideas? </p>