feat: support simultaneous online on custom and builtin rendezvous servers - #3
Open
hashbk wants to merge 2 commits into
Open
feat: support simultaneous online on custom and builtin rendezvous servers#3hashbk wants to merge 2 commits into
hashbk wants to merge 2 commits into
Conversation
…rvers Enable the client to register on both the hardcoded RENDEZVOUS_SERVERS and the user-configured custom-rendezvous-server simultaneously, and accept incoming connections from either server. Changes: - Update hbb_common submodule to include get_rendezvous_servers() merge logic (custom + builtin servers, deduplicated) - Replace global SHOULD_EXIT cascade with per-host exit tracking (EXITED_HOSTS), so one server disconnecting doesn't kill the other - Change SOLVING_PK_MISMATCH from Mutex<String> to Mutex<HashSet<String>> to allow independent PK mismatch resolution per host - Update outdated comment in start_tcp
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.
Summary
Currently, when a user configures a
custom-rendezvous-servervia Settings, the client only registers on that custom server, discarding the hardcodedRENDEZVOUS_SERVERS. This PR enables the client to be online on both the user-configured server and the builtin public servers simultaneously, and accept incoming connections from either.Changes
libs/hbb_common/src/config.rsConfig::get_rendezvous_servers(): Whencustom-rendezvous-serveris set, now callsmerge_with_builtin_servers()to return the custom server + hardcodedRENDEZVOUS_SERVERS(deduplicated), instead of returning only the custom server.src/rendezvous_mediator.rsSHOULD_EXITcascade withEXITED_HOSTS: Mutex<HashSet<String>>. Only when all hosts have exited or a manual restart is triggered doesSHOULD_EXITget set, so one server disconnecting doesn't kill the other mediator.SOLVING_PK_MISMATCHfromMutex<String>toMutex<HashSet<String>>, allowing independent PK mismatch resolution per host without blocking other hosts from registering.start_tcp.UI Impact
None. The
using_public_server()check remains unchanged — it still returnsfalsewhen a custom server is configured, preserving existing UI behavior.Related