-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[SignalR] Add an option to enable client side ping check instead of only relying on client side PingMessage #23794
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
Comments
The feature you describe above is close to something I've been wanting to do for awhile. There should be a way to enforce clients to have to send pings.
This is a small bug, it should send the ping immediately after starting the connection, like the .NET client does.
This is the actual issue they are seeing, it's an issue with the auth story and tracked by #5283 |
We should make this automatic for newer clients, so they can opt-in to this. Not for security, but to notice issues like those described in #41081 sooner. |
Do we have an ETA for fixing this issue? Shall it follow the net7 release pipeline or it can be released on its own since it only affects the js package? We have several customers reporting this issue. cc @davidfowl |
We can do it during the .NET 7 release timeframe. cc @rafikiassumani-msft I'm going to move this out of the backlog for re-triage. |
Thanks for contacting us. We're moving this issue to the |
We have updating the js client for .NET 7. |
Hello @BrennanConroy ! I was wondering what could be the reason why the issue is still open. |
Because the work hasn't been done... |
Is your feature request related to a problem? Please describe.
The issue is SignalR server-side relies on the first
PingMessage
to enable the client-side ping check.aspnetcore/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs
Line 180 in 2ad8121
However, if the client-side sends out messages constantly and more frequently than keep alive, the client never has any chance to send out
PingMessage
, and as a result the server-side ping check never invokes.aspnetcore/src/SignalR/clients/ts/signalr/src/HubConnection.ts
Line 344 in d5cf36a
And this can cause the issue that when using SSE to connect to the service, although client fails to send to the server when JWT token expiration(401), the connection never closes, like described here Azure/azure-signalr#943
Describe the solution you'd like
Provide an option to explicitly enable the ping check through
SignalROptions
can solve the issue.The text was updated successfully, but these errors were encountered: