We have a hub that manage clients like a chat.
On some occasions we have noticed that there are "dead" connections that no disconnect event has been invoked.
On ASP .NET framework 4.5.2 SignalR, we used ITransportHeartbeat to check the current connection state:
// SignalR connection state check - .NET framework 4.5.2
var heartBeat = GlobalHost.DependencyResolver.Resolve<ITransportHeartbeat>();
var connectionId = appConnection;
var connection = heartBeat.GetConnections().FirstOrDefault(
c => c.ConnectionId == connectionId);
if (!connection.IsAlive)
{
//...
}
I don't see ITransportHeartbeat anymore on SignalR .NET Core. Is there any way to find the current specific connection state?