-
-
Notifications
You must be signed in to change notification settings - Fork 810
Fix: Don't send forms that are supposed to have been closed #6163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ient Instead, close them on the Geyser end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to fix a race condition where forms that should have been closed were being re-sent through resendAllForms(). The fix changes the closeForms() method to directly handle unsent forms by calling their response handlers with an empty string instead of sending them to the client and immediately closing them.
Changes:
- Reorganized imports alphabetically
- Added Iterator import for safe map modification
- Modified
closeForms()to process unsent forms locally instead of sending them to the client
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java
Outdated
Show resolved
Hide resolved
|
I'm personally never really a fan of calling clear, because of that I liked your initial design of using an iterator better. Other than that the fix looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
With this change, all forms are cleared on Geyser's end when they're closed. This ensures that forms aren't accidentally re-sent when a new form is send, since that calls FormCache#resendAllForms()