title: SignalR - Not calling OnReconnected using long polling
body: <p>From what I have read a SignalR client should not miss any messages from the server while it's connected. This does not seem to be the case when using long polling.</p>
  
  <p>I have a straightforward hub based application using SignalR 1.1.2. When using SSE, if the network cable is unplugged and plugged back in again within the timeout period, both the client and server are notified that a reconnect has occurred and, as far as I can tell, no messages are missed. When  using long polling, this seems to happen:</p>
  
  <ul>
  <li>When the connection is created ($.connection.hub.start()) the OnConnected method is called in the hub and the client goes into connected state.</li>
  <li>If I then unplug the network cable and pop it back in quickly, there is no call to OnDisconnected or OnConnected. No messages are missed. Any messages waiting on the server are subsequently sent to the client. OK so far.</li>
  <li>If I unplug the network cable and let the long poll expire, I get a call to OnDisconnected. There is no state change on the client.</li>
  <li>If I plug the network cable back in the client starts receiving messages again. There has been no notification on the client that it has been disconnected, but the client has missed some messages. There is no call to OnReconnected or OnConnected on the server.</li>
  </ul>
  
  <p>Is this a bug? The behaviour seems very different between SSE and long polling.
  Is there a recommended strategy to ensure that the client does not miss messages in this scenario? I could keep track of connection ids on the server and send periodic pings from the client - if I get a ping after an OnDisconnected I could send a message to tell the client to resync, but this doesn't seem like the right thing to do.
  Any suggestions?</p>