Repository navigation
RUST-BUG-111: run ED2K connected startup only on a new client ID - #102
Merged
Merged
Conversation
Stock eMule runs the connected-server startup exactly once per assigned client ID. Gate the ConnectSucceeded event and offer-file republish on first acceptance or a real client-ID reassignment, while still refreshing server flags and public-IP state on redundant same-ID IDCHANGE.
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.
What
Stock eMule performs the connected-server transition exactly once per assigned client ID. OP_IDCHANGE previously re-ran the full startup path on every packet, re-emitting \ConnectSucceeded\ and republishing the offer-file catalog when a server echoed IDCHANGE or re-sent it after the callback test.
This change gates the \ConnectSucceeded\ event and \send_connected_server_startup\ on:
Server flags and public-IP state are still refreshed on every non-zero IDCHANGE, matching stock behavior.
Tests
edundant_same_id_idchange_does_not_rerun_connected_startup\
Both exercise \handle_server_packet\ with a real connected session and assert ConnectSucceeded counts plus public-IP/assigned-ID state.
Validation
Closes #76