Ejemplo n.º 1
0
 private void Callback(object state)
 {
     _users.AsParallel().Where(u => u.IsActive()).ForAll(async u =>
     {
         //_logger.LogInformation(u.Account.Login + "is checked for connection");
         if (!u.CheckForConnection())
         {
             await _gamingPlatform.DisconnectUserAsync(u.Account.Login);
             _logger.LogWarning($"user {u.Account.Login} disconnected due to timeout!");
         }
         else
         {
             u.ResetConnection();
         }
     });
 }
Ejemplo n.º 2
0
        public async Task <IActionResult> Disconnect([FromQuery] string login)
        {
            await _gamingPlatform.DisconnectUserAsync(login);

            return(Ok());
        }