• Mahmoud Aglan's avatar
    fix: bulletproof matchmaking queue across all games · 1c145579
    Mahmoud Aglan authored
    - Add dequeue handler to backgammon-match.php (was missing)
    - Add 90-second stale entry cleanup to ludo/domino/backgammon queues
    - Add atomic opponent claiming (conditional update) to prevent race conditions
    - Fix client queue.js to route dequeue to correct game endpoint
    - Register unmountQueue for proper cleanup when exiting search screen
    - Remove json_encode on jsonb fields in backgammon (prevent double-encoding)
    
    Fixes: self-matching, ghost queue entries, and race condition where two
    players simultaneously claim the same opponent.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    1c145579
backgammon-match.php 10.4 KB