public override async Task OnConnectedAsync() { await base.OnConnectedAsync(); var client = mOnlineClientManager.GetByConnectionId(Context.ConnectionId); if (client == null) { client = CreateClientForCurrentConnection(Context.GetHttpContext().Request.Query["accessToken"].ToString()); mOnlineClientManager.Add(client); } }