diff --git a/svc/pkg/mm/util/src/key.rs b/svc/pkg/mm/util/src/key.rs index d63055425c..1d70c2a9e2 100644 --- a/svc/pkg/mm/util/src/key.rs +++ b/svc/pkg/mm/util/src/key.rs @@ -62,8 +62,6 @@ pub mod lobby_config { pub is_custom: bool, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub state_json: Option, - #[serde(rename = "nc")] - pub is_node_closed: bool, } pub const NAMESPACE_ID: &str = "ns"; @@ -77,7 +75,6 @@ pub mod lobby_config { pub const IS_CLOSED: &str = "c"; pub const IS_CUSTOM: &str = "cu"; pub const STATE_JSON: &str = "st"; - pub const IS_NODE_CLOSED: &str = "nc"; } /// HASH diff --git a/svc/pkg/mm/worker/redis-scripts/lobby_find.lua b/svc/pkg/mm/worker/redis-scripts/lobby_find.lua index d74590e978..5a23a05174 100644 --- a/svc/pkg/mm/worker/redis-scripts/lobby_find.lua +++ b/svc/pkg/mm/worker/redis-scripts/lobby_find.lua @@ -32,15 +32,6 @@ if query.kind.direct ~= nil then return { 'err', 'LOBBY_NOT_FOUND' } end - -- Check that lobby and node are not closed - local config_keys = redis.call('HMGET', key_direct_lobby_config, 'c', 'nc') - local is_closed = config_keys[1] == '1' - local is_node_closed = config_keys[2] == '1' - - if is_closed or is_node_closed then - return {'err', 'LOBBY_CLOSED'} - end - -- Get max player count local max_player_count = nil if query.join_kind == 'direct' then diff --git a/svc/pkg/mm/worker/redis-scripts/nomad_node_closed_set.lua b/svc/pkg/mm/worker/redis-scripts/nomad_node_closed_set.lua index e5a0a51117..5070539020 100644 --- a/svc/pkg/mm/worker/redis-scripts/nomad_node_closed_set.lua +++ b/svc/pkg/mm/worker/redis-scripts/nomad_node_closed_set.lua @@ -5,13 +5,11 @@ for i=1,lobby_count do local lobby_id = ARGV[real_i * 3 + 2] local max_players_normal = tonumber(ARGV[real_i * 3 + 3]) local max_players_party = tonumber(ARGV[real_i * 3 + 4]) - + local key_lobby_config = KEYS[real_i * 4 + 2] - - redis.call('HSET', key_lobby_config, 'nc', 0) - + local is_closed = redis.call('HGET', key_lobby_config, 'c') - + -- Don't modify closed lobbies if is_closed ~= '1' then local key_lobby_player_ids = KEYS[real_i * 4 + 3] diff --git a/svc/pkg/mm/worker/src/workers/lobby_create/mod.rs b/svc/pkg/mm/worker/src/workers/lobby_create/mod.rs index 47e8788247..1d7f4b5fbe 100644 --- a/svc/pkg/mm/worker/src/workers/lobby_create/mod.rs +++ b/svc/pkg/mm/worker/src/workers/lobby_create/mod.rs @@ -206,7 +206,6 @@ async fn worker(ctx: &OperationContext) -> Globa ready_ts: None, is_custom: ctx.is_custom, state_json: None, - is_node_closed: false, })?) .arg(ctx.ts() + util_mm::consts::LOBBY_READY_TIMEOUT) .key(key::lobby_config(lobby_id)) diff --git a/svc/pkg/mm/worker/src/workers/lobby_find/find.rs b/svc/pkg/mm/worker/src/workers/lobby_find/find.rs index 2a00c795aa..4c9ea73570 100644 --- a/svc/pkg/mm/worker/src/workers/lobby_find/find.rs +++ b/svc/pkg/mm/worker/src/workers/lobby_find/find.rs @@ -203,7 +203,6 @@ pub async fn find( is_closed: false, is_custom: false, state_json: None, - is_node_closed: false, }, ready_expire_ts: ctx.ts() + util_mm::consts::LOBBY_READY_TIMEOUT, }) diff --git a/svc/pkg/mm/worker/src/workers/nomad_node_closed_set.rs b/svc/pkg/mm/worker/src/workers/nomad_node_closed_set.rs index e7880ae4ed..edba355b47 100644 --- a/svc/pkg/mm/worker/src/workers/nomad_node_closed_set.rs +++ b/svc/pkg/mm/worker/src/workers/nomad_node_closed_set.rs @@ -61,8 +61,7 @@ async fn worker( util_mm::JoinKind::Party, ), lobby.lobby_id.to_string(), - ) - .hset(util_mm::key::lobby_config(lobby.lobby_id), "nc", 1); + ); } pipe.query_async(&mut ctx.redis_mm().await?).await?;