public override async Task OnDisconnectedAsync(Exception exception) { var userId = GetUserId(); if (!string.IsNullOrEmpty(userId)) { await _userConnectionService.Delete(userId, Context.ConnectionId); } await base.OnDisconnectedAsync(exception); }