mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-16 04:42:04 +00:00
fix(multiplayer): recover stale proposal mutations
This commit is contained in:
@@ -119,12 +119,8 @@ func _send_accept() -> void:
|
||||
func _on_request_failed(operation: String, http_code: int, detail: String) -> void:
|
||||
if _finished:
|
||||
return
|
||||
if operation == "proposal_accept" and http_code == 409 and not ControlPlaneClient.state.proposal_id.is_empty():
|
||||
print("SMOKE[%s]: concurrent accept conflicted at an old revision; recovering the authoritative proposal..." % _role)
|
||||
_accept_sent = false
|
||||
var err := ControlPlaneClient.recover_proposal(ControlPlaneClient.state.proposal_id)
|
||||
if err != OK and err != ERR_BUSY:
|
||||
_finish(false, "proposal recovery after concurrent accept failed to start: %s" % error_string(err))
|
||||
if operation == "proposal_accept" and http_code == HTTPClient.RESPONSE_CONFLICT:
|
||||
print("SMOKE[%s]: concurrent accept conflicted; ControlPlaneClient is recovering the authoritative proposal..." % _role)
|
||||
return
|
||||
_finish(false, "%s failed: http=%d detail=%s" % [operation, http_code, detail])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user