Esempio n. 1
0
 private void AddServer(CrateServer server)
 {
     lock (_lockObj)
     {
         if (!ActiveServers.Contains(server))
         {
             ActiveServers.Add(server);
         }
     }
 }
Esempio n. 2
0
 public void MarkAsFailed(CrateServer server)
 {
     lock (_lockObj)
     {
         if (ActiveServers.Count == 1)
         {
             ActiveServers = _allServers;
         }
         ActiveServers.Remove(server);
         Task.Delay(TimeSpan.FromMinutes(3)).ContinueWith(x => AddServer(server));
         _currentServer = 0;
     }
 }