mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 11:42:02 +00:00
fix(multiplayer): complete live results atomically
This commit is contained in:
@@ -102,6 +102,9 @@ func (s *ResultStore) Submit(resultID string, result MatchResult, binding Worklo
|
||||
if resultID == "" || !sameBinding(s.expected, binding) {
|
||||
return ResultReceipt{}, false, ErrResultBinding
|
||||
}
|
||||
if now.IsZero() {
|
||||
return ResultReceipt{}, false, ErrResultInvalid
|
||||
}
|
||||
if err := validateResult(s.expected, result); err != nil {
|
||||
return ResultReceipt{}, false, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user