public override async Task OnDisconnectedAsync(Exception?exception) { string user = _sessionService.GetUserNameByConnectionId(Context.ConnectionId); var activeFriends = _friendsService.GetActiveFriendByUserName(user); if (activeFriends != null) { await Clients.Clients(activeFriends).NotificationFriendChangeStatus(user, false); } _sessionService.CloseSessionUser(user); await base.OnDisconnectedAsync(exception); }