When OnDisconnect is invoked, there is no Exception passed through.
See original GitHub issueDescribe the bug
When that OnDisconnect method is called, it appears as though there is no Exception passed through, so there’s no way to differentiate between a user that has just closed their browser, or a user that has been experiencing connectivity issues. SignalR for .NET Framework would pass through a boolean informing the server that it was as a result of a timeout.
To Reproduce
Exceptions (if any)
Further technical details
- Your Azure SignalR SDK version
- Your Server ASPNETCORE version or Assembly version of
Microsoft.AspNetCore.SignalR
- Your SignalR Client SDK version
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Java URL doesn't seem to connect, but no exception thrown
You have opened the connection but not closed it. To request that the HttpURLConnection be closed, you should call its disconnect() method.
Read more >Use hubs in SignalR for ASP.NET Core
All.SendAsync(...) can fail if it's called without await and the hub method completes before SendAsync finishes.
Read more >Invoke - AWS Lambda
Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function ......
Read more >Error Messages — SQLAlchemy 2.0 Documentation
Exception raised for errors that are related to the database itself, and not the interface or data being passed. This error is a...
Read more >Process | Node.js v20.5.1 Documentation
The listener callback function is invoked with the value of process.exitCode passed as the only argument. The 'beforeExit' event is not emitted for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for the late response.
When client “loses internet connection”, SignalR hub leverages the SignalR client ping messages to determine if the client is still there, however SignalR swallows the OperationCancelledException https://github.com/dotnet/aspnetcore/blob/88ee825bca9978df7f1d8c8c09b71b6dffeeb53b/src/SignalR/server/Core/src/HubConnectionHandler.cs#L169 and as a result it fails to differentiate from these 2 conditions and here is the issue https://github.com/dotnet/aspnetcore/issues/26701
In such a scenario, the Azure SignalR acts as a proxy and there is little Azure SignalR can do to change the behavior in SignalR application layer.
I’ll see if SignalR protocol could support this.