Skip to content


Subversion checkout URL

You can clone with
Download ZIP


when server appdomain restart, client reconnect with previous group token in querystring, sometimes the group is not added in server #2207

Xiaohongt opened this Issue · 3 comments

2 participants


Functional impact:
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

Actual result:
Many times some webSockets connection become not in the group in server after reconnect, serverSentEvents connection also had repro too.

tracing: in

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:

0 h-HubConnectionAPI
1 hc-HubConnectionAPI.a28e8937-a3ca-4947-9bab-6fc520ad0853
2 c-a28e8937-a3ca-4947-9bab-6fc520ad0853
3 ack-a28e8937-a3ca-4947-9bab-6fc520ad0853
4 c-abd685e7-6cd5-48e0-8bf9-81adfc43428b

Note, in tracing:
webSockets 3c56f8ac-737e-448c-bfca-47ba4d42d18c also repro this issue too
webSockets 4addbe64-0492-4166-90ad-d3332b626d57 repro issue #2290

@davidfowl davidfowl was assigned

@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.

@Xiaohongt Xiaohongt was assigned

verified cursor keys are not messed up when app domain restart

@Xiaohongt Xiaohongt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.