fix(arena-tk2): park returns 3002 RETRY + empty node_server_url
Two client-crash bugs in the do_matching response when no partner is waiting: 1. matching_state was 3001 (RC_BATTLE_MATCHING_ILLEGAL); the client's Matching.OnFinishedDoMatching switch maps that to an error dialog, not a retry. The retry state is 3002 (RC_BATTLE_MATCHING_RETRY). 2. node_server_url was omitted entirely. The client's DoMatchingBase.SettingDoMatchingData reads it via data["node_server_url"].ToString() with no Keys.Contains guard, so absence throws KeyNotFoundException out of NetworkManager.Connect before the matching_state switch is even reached. Prod RETRY captures send "" while waiting and the real URL only on SUCCEEDED; match that. battle_id stays absent; its accessor IS guarded. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -62,10 +62,16 @@ public class ArenaTwoPickBattleController : SVSimController
|
||||
ct);
|
||||
if (paired is null)
|
||||
{
|
||||
// 3002 = RC_BATTLE_MATCHING_RETRY: client polls again. 3001 is ILLEGAL
|
||||
// and shows an error dialog on the client side. node_server_url must be
|
||||
// present (the client's DoMatchingBase.SettingDoMatchingData calls
|
||||
// .ToString() on it without a Keys.Contains guard); prod sends "" while
|
||||
// waiting and the real URL only on SUCCEEDED. battle_id stays absent
|
||||
// (its accessor IS guarded).
|
||||
return Ok(new DoMatchingResponseDto
|
||||
{
|
||||
MatchingState = 3001,
|
||||
// BattleId / NodeServerUrl null — client polls again.
|
||||
MatchingState = 3002,
|
||||
NodeServerUrl = "",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user