In repro there were 6 clients and joined group before server rebuild, after server rebuild or web.config change, all clients reconnected with the previous group token in querystring, and 4 clients were still in the group and can receive message sent to the group, but 2 clients were not in the group in server anymore and can't receive message sent to the group, and the 2 clients can't be added in group anymore ( server return error "A task was canceled" when add that connection to group).
1). We can use SignalR sample HubConnectionAPI, update client to join group e.g. group++1 after connection start
2). Request about 9 clients ( 3 webSockets, 3 foreverFrame, 3 serverSentEvents)
3). Add space in the app web.cofig and save it, then clients will reconnect
Many times some webSockets connection become not in the group in server after reconnect, serverSentEvents connection also had repro too.
Trace_Issue#2207.zip in https://skydrive.live.com/?cid=7230a11e3a3e316b&id=7230A11E3A3E316B%21455
I added trace for DefaultSubscription.cs, in signalr.bus.log.txt we can see that after reconnect, webSockets 9cf410cc-4d41-4ed5-9679-e6179b0afc0e repro, the Key in _cursors become below which is not right for 9cf410cc-4d41-4ed5-9679-e6179b0afc0:
Note, in tracing:
webSockets 3c56f8ac-737e-448c-bfca-47ba4d42d18c also repro this issue too
webSockets 4addbe64-0492-4166-90ad-d3332b626d57 repro issue #2290
@Xiaohongt Try the checksum branch and see if it fixes the issue.
@Xiaohongt the connection id doesn't change, it's the same connection id across app domain restarts. The point of the change is to add a checksum to the payload that identifies if the app domain has been recycled or not. I just want to verify that the current change fixes the problem.
Use a random 4 bytes for cursor checksum for in DefaultSubscription.
verified cursor keys are not messed up when app domain restart