Repository navigation
GGPO: drop a received packet whose handler threw - #686
Merged
Merged
Conversation
…k thread, pass allow on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
GGPO (
3rdparty/ggpo):Udp::OnLoopPoll: a received packet whoseOnMsgthrew is removed from the receive queue before the exception goes on. Before, it stayed at the head and threw again on every later poll, so no packet behind it was handled.Udp::NetThreadLoop: aGGPOExceptionfrom reading or pumping sends is logged. The network thread had no catch.ggpo_set_disconnect_without_rollbackpassesallowon instead oftrue. The only caller passestrue, so nothing changes at run time.3rdparty/ggpo/README.mdlists the changes.Rationale behind Changes
One bad packet should not block the receive queue for the rest of the session. The library code here is the same as in flycast; a flycast PR with the same diff follows.
Suggested Testing Steps
tests/zdxsv/rbk.py 2 1(2-player GGPO rollback): PASS (private rig).ggpo.lib: two packets, the first one makesOnMsgthrow, three polls. With this change: 1 throw, then the second packet is handled. With the oldudp.cpp: 3 throws, the second packet is never handled.Did you use AI to help find, test, or implement this issue or feature?
Yes. Written and tested by an AI agent (Claude Code).
🤖 Generated with Claude Code