Skip to content

Fix lobby join callback flow and improve lobby discovery synchronization#497

Open
Rustbeard86 wants to merge 2 commits into
Detanup01:devfrom
Rustbeard86:compat-active-lobby-data
Open

Fix lobby join callback flow and improve lobby discovery synchronization#497
Rustbeard86 wants to merge 2 commits into
Detanup01:devfrom
Rustbeard86:compat-active-lobby-data

Conversation

@Rustbeard86
Copy link
Copy Markdown

Summary

This PR fixes the post-discovery join path for lobby-based multiplayer and improves early lobby discovery synchronization.

What Changed

Networking sockets callback flow

  • store and invoke the global networking callbacks registered through ISteamNetworkingUtils
  • emit the initial connection status transition when ConnectP2P / ConnectByIPAddress begins
  • propagate authentication and relay status through the same global callback path
  • time out stalled outbound connect attempts locally instead of retrying indefinitely

Lobby discovery synchronization

  • trigger an immediate announce burst when lobby search starts before any individual peer is connected
  • allow a longer initial search window while the first sync arrives
  • support explicit lobby data requests through Lobby_Messages::DATA_REQUEST
  • allow the lobby owner to reply with a targeted lobby snapshot
  • send lobby data proactively on low-level peer connect

Why

The previous behavior allowed the client to discover the host lobby, but the join flow could still stall in a long retry or timeout cycle because the expected networking callback path was not being delivered to the game.

In parallel, lobby discovery relied too heavily on passive propagation. The added synchronization path makes initial lobby visibility and targeted lobby refresh more reliable during early peer setup.

Verification

  • rebased onto latest dev
  • branch reduced to 2 focused commits
  • built api_regular successfully on the rebased branch

Related Issues

May address or improve #162, #339, and #395 based on matching symptoms in the join path and lobby visibility flow.

May also improve #265, but that has not been verified.

@Rustbeard86
Copy link
Copy Markdown
Author

Enjoy my AI generated PR

@Rustbeard86
Copy link
Copy Markdown
Author

The failing Windows matrix leg looks transient rather than PR-related.

I checked the exact target:

  • win / build (lib_game_overlay_renderer, Win32, release)

Across the last 12 Emu PR runs, that same job completed successfully in 11 runs and failed only in this run. In this case the Build target step itself succeeded with 0 Error(s), and the failure occurred in Upload target package, after actions/upload-artifact@v7 had already validated the path and artifact metadata.

So this does not currently look like a code regression from this PR.

Separately, there is a real workflow bug in .github/workflows/emu-build-all-win.yml:

  • git config --local core.autocrlf false
  • git config --system core.autocrlf false
  • git config --global core.autocrlf false

are run before actions/checkout, which means --local executes before the repository exists. That produces:

  • fatal: --local can only be used inside a git repository

That does not appear to be the cause of this specific failed matrix leg, but it is still incorrect workflow setup.

Potential resolution:

  1. Move the Ensure LF line ending step to after Checkout branch, or
  2. change the first command from git config --local ... to git config --global ... if repo-local config is not required.

Given the recent history for this exact matrix target, I would currently treat the failed upload as transient unless it reproduces on rerun.

@Rustbeard86 Rustbeard86 marked this pull request as ready for review May 6, 2026 13:26
@gameclamp
Copy link
Copy Markdown

Still not working on #395

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.

2 participants