Skip to content

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

halter73 opened this Issue Sep 5, 2013 · 2 comments

3 participants

SignalR member
halter73 commented Sep 5, 2013

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 Sep 6, 2013
SignalR member

Fixed unit tests in d3b1f35

@Xiaohongt Xiaohongt was assigned Sep 6, 2013
SignalR member

verified that cursor work correctly after appdomain restart

@Xiaohongt Xiaohongt closed this Oct 2, 2013
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.