We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1c5ebd commit 6f44caeCopy full SHA for 6f44cae
1 file changed
packages/core/api/actor/src/utils.rs
@@ -40,14 +40,11 @@ pub fn filter_edge_dc(
40
) -> GlobalResult<bool> {
41
if config.server()?.rivet.has_multiple_server_types() {
42
// Validate that the dc has a worker & guard so it can be contacted
43
- Ok(dc
44
- .pools
45
- .iter()
46
- .any(|x| x.pool_type == PoolType::Worker && x.desired_count > 0)
47
- && dc
48
49
50
- .any(|x| x.pool_type == PoolType::Guard && x.desired_count > 0))
+ Ok(dc.pools.iter().any(|x| {
+ x.pool_type == PoolType::Worker && x.desired_count.max(x.min_count).min(x.max_count) > 0
+ }) && dc.pools.iter().any(|x| {
+ x.pool_type == PoolType::Guard && x.desired_count.max(x.min_count).min(x.max_count) > 0
+ }))
51
} else {
52
// All DC are valid
53
Ok(true)
0 commit comments