Event handlers while disconnecting and creating a new hub
Closed this issue · 2 comments
Hi, I am using SignalR in an Ionic app and I am testing a scenario when a user (with an established SignalR connection) logs out and than logs back in. Application disconnects from SignalR hub by calling hub.disconnect() method. When the user logs back in, a new Hub is created, but now the stateChanged with $.signalR.connectionState.connected is invoked twice. It seems that event handlers remain active after hub disconnection. Has anyone else encountered this problem?
Yes I am seeing the same issue, did you find a solution?
useSharedConnection:false seems to resolve the problem, at least stateChanged($.signalR.connectionState.connected) does not get invoked multiple times anymore. Not sure of any other consequences.