Skip to content

refactor(PlayerConnectService): replace shared room future with local… - #219

Merged
sharrlotte merged 1 commit into
mainfrom
dev
May 31, 2026
Merged

refactor(PlayerConnectService): replace shared room future with local…#219
sharrlotte merged 1 commit into
mainfrom
dev

Conversation

@sharrlotte

@sharrlotte sharrlotte commented May 31, 2026

Copy link
Copy Markdown
Member

… instances

remove the class-level roomFuture field, eliminate redundant isDone checks and future reset code, and use a new CompletableFuture for each method invocation

Summary by CodeRabbit

  • Bug Fixes

    • Resolved an issue with concurrent request processing to ensure proper request isolation.
  • Chores

    • Version updated to v4.57.5-v8.

… instances

remove the class-level roomFuture field, eliminate redundant isDone checks and future reset code, and use a new CompletableFuture for each method invocation
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 196e5d26-6ce4-4506-8fea-20334ed32927

📥 Commits

Reviewing files that changed from the base of the PR and between e0d0c3e and d7929da.

📒 Files selected for processing (2)
  • mod.hjson
  • src/mindustrytool/services/PlayerConnectService.java

Walkthrough

PlayerConnectService is refactored to use per-invocation CompletableFutures instead of a shared service-level field, eliminating potential async state conflicts. The mod version is incremented to v4.57.5-v8.

Changes

Async State Refactoring and Version Bump

Layer / File(s) Summary
Per-invocation async state in PlayerConnectService
src/mindustrytool/services/PlayerConnectService.java
Removed the shared roomFuture field from the service class. Updated findPlayerConnectRooms() to create a new per-call CompletableFuture, wire the HTTP request's error handler to complete that future exceptionally, and removed the finally block that previously reset the shared state after each request.
Version metadata update
mod.hjson
Bumped mod version from v4.57.4-v8 to v4.57.5-v8.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A future per call, no sharing state,
Async flows clean, no race conditions to wait,
Shared ghosts removed, the code runs true,
Version bumped bright—v4.57.5 for you!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sharrlotte
sharrlotte merged commit e7776bc into main May 31, 2026
2 of 3 checks passed
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