Skip to content

fix(online): make lobby and social async state thread-safe - #569

Open
tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/fix/online-async-state
Open

fix(online): make lobby and social async state thread-safe#569
tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/fix/online-async-state

Conversation

@tintinhamans

Copy link
Copy Markdown

Hardens asynchronous lobby and social-service state against concurrent access and overlapping requests.


  • Protect friend, pending-request, and blocked-user caches with a mutex.
  • Build social HTTP results in temporary maps and atomically swap them into the shared cache.
  • Make lobby dirty and search-in-progress flags atomic.
  • Prevent overlapping lobby searches and preserve refresh notifications received during an active search.
  • Restore the lobby dirty flag when a search fails so it can be retried.
  • Avoid clearing valid lobby results before a replacement response is successfully parsed.
  • Preserve each request's completion callback and invoke it after search state is reset.
  • Avoid copying the recently played player map when retrieving it.

@github-actions

Copy link
Copy Markdown

⚠️ Title/Commit Validation Failed

Invalid PR title:

  • fix(online): make lobby and social async state thread-safe

Invalid commit messages:

  • fix(online): harden lobby and social async state
    PR titles and commit messages must follow conventional commits format:
type: Description
type(scope): Description

Allowed types: bugfix, build, chore, ci, docs, fix, feat, perf, refactor, revert, style, test, tweak, unify

See CONTRIBUTING.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant