8000 GGPO: drop a received packet whose handler threw by inada-s-ai[bot] · Pull Request #686 · inada-s/pcsx2 · GitHub
[go: up one dir, main page]

Skip to content

GGPO: drop a received packet whose handler threw - #686

Merged
inada-s merged 1 commit into
zdxsv-masterfrom
ai/ggpo-recv-head
Nov 19, 2026
Merged

inada-s merged 1 commit into
zdxsv-masterfrom
ai/ggpo-recv-head

Conversation

@inada-s-ai
@inada-s-ai inada-s-ai Bot commented Nov 18, 2026
Copy link
Copy Markdown

Description of Changes

GGPO (3rdparty/ggpo):

  • Udp::OnLoopPoll: a received packet whose OnMsg threw 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: a GGPOException from reading or pumping sends is logged. The network thread had no catch.
  • ggpo_set_disconnect_without_rollback passes allow on instead of true. The only caller passes true, so nothing changes at run time.
  • 3rdparty/ggpo/README.md lists 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

  • Built locally (MSVC, Windows x64).
  • tests/zdxsv/rbk.py 2 1 (2-player GGPO rollback): PASS (private rig).
  • A throwaway unit test (not committed) against the built ggpo.lib: two packets, the first one makes OnMsg throw, three polls. With this change: 1 throw, then the second packet is handled. With the old udp.cpp: 3 throws, the second packet is never handled.
  • Not run: the network-thread catch (no test makes a send or read throw there), macOS/Linux/arm64 builds.

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

@inada-s
inada-s merged commit 4ab49df into zdxsv-master Nov 19, 2026
3 of 4 checks passed
@inada-s
inada-s deleted the ai/ggpo-recv-head branch November 19, 2026 02:28
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

0