The registerCallbacks and the unregisterCallbacks methods always create a new function for the handlers, therefore the unregistration process will not work (because the comparison in the HubConnection's off method is reference-based).
https://github.com/dotnet/aspnetcore/blob/master/src/SignalR/clients/ts/signalr/src/HubConnection.ts#L460
Related PR: #22
The
registerCallbacksand theunregisterCallbacksmethods always create a new function for the handlers, therefore the unregistration process will not work (because the comparison in theHubConnection'soffmethod is reference-based).https://github.com/dotnet/aspnetcore/blob/master/src/SignalR/clients/ts/signalr/src/HubConnection.ts#L460
Related PR: #22