private void AddServer(CrateServer server) { lock (_lockObj) { if (!ActiveServers.Contains(server)) { ActiveServers.Add(server); } } }
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; } }