fix: send resourcepacks after server connect - #18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abc6dfbd2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @Subscribe | ||
| fun onLogin(event: PostLoginEvent) { | ||
| fun onServerPostConnect(event: ServerPostConnectEvent) { | ||
| if (!stopped.get()) coordinator.onLogin(event.player) |
There was a problem hiding this comment.
Gate snapshot fanout until post-connect
When the resource-pack client publishes a READY snapshot after PostLoginEvent but before this ServerPostConnectEvent, ResourcePackCoordinator.onSnapshot still iterates every proxy-online player and sends the request during the unsafe transition. That send records the fingerprint, so this post-connect call is then suppressed as a duplicate and the discarded prompt is never retried. Track which players have completed their first backend connection (or otherwise prevent/clear pre-connect snapshot deliveries) before relying on this handler; the new test misses the race because its OnlinePlayerView is empty.
Useful? React with 👍 / 👎.
Pull Request
Description
Send Velocity resource-pack requests only after the player has completed a backend connection. This prevents the initial server transition from discarding the resource-pack prompt sent during
PostLoginEvent.Type of Change
Related Issues
Testing
Checklist