Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrleansHubLifetimeManager incorrectly resolves hub name for hubs with typed clients. #129

Open
JRWinter1 opened this issue Feb 15, 2022 · 0 comments

Comments

@JRWinter1
Copy link

JRWinter1 commented Feb 15, 2022

When using a hub with a typed client, e.g. MyHub <IMyHubClient> , the ctor of OrleansHubLifetimeManager will resolve the hub name to be MyHubClient.

The offending code -> https://github.com/OrleansContrib/SignalR.Orleans/blob/master/src/SignalR.Orleans/OrleansHubLifetimeManager.cs#L37. Why does this check for GenericTypeArguments? At a guess, I would assume this may have been for older versions of signalR that I am not familiar with.

Resolving the hub name in the lifetime manager is not consistent with the hub context code -> https://github.com/OrleansContrib/SignalR.Orleans/blob/master/src/SignalR.Orleans/Core/HubContext.cs#L16.
This results in a mismatch between the OrleansHubLifetimeManager calls and the hub context calls. I.e. you will end up with separate grain activations when adding to groups and publishing to groups.

It would also be nice to keep up to date with the signalr library and support strongly typed hub contexts (https://docs.microsoft.com/en-us/aspnet/core/signalr/hubcontext?view=aspnetcore-6.0#inject-a-strongly-typed-hubcontext).
I would be happy to start contributing to this library if I this is something people would like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant