-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Closed
Copy link
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers
Description
Issue moved from SignalR/SignalR#4455
- Please respond to @aneeshsiva77.
From @aneeshsiva77 on Monday, March 30, 2020 9:01:13 AM
I have SignalR hub which has OnDisconnectedAsync(Exception exception) override the base method. Currently this method will hit on all the disconnected scenarios (Connection stopped from the client side, Browser Closed, Browser Tab closed etc.) But the parameter 'exception' is always null ,
Expected behavior
Exception must has some message instead null
Actual behavior
null exception
Steps to reproduce
public override async Task OnDisconnectedAsync(Exception exception)
{
var connectionID = Context.ConnectionId;
// Disconnect by intention
if (exception == null)
{
//User Closed the connection
}
else {
//Connection closed unexpectedly
}
await TryStopBroadcast();
await base.OnDisconnectedAsync(exception);
}
Metadata
Metadata
Assignees
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers