Repository navigation
Conversation
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.
recently i have been debugging an issue with reverse on an unreliable network. some requests stall without reaching the final destination on bridge side. the analysis shows that sometimes the bridge starts a new reverse worker when the old one is lost. however the portal continues selecting the old half-open worker even if there's a new worker in healthy state.
the first commit is a in-process unit test repro which fails on master but passes with the proposed fix. half open connection simulated by dropping all written data.
the second commit is my proposed fix to add acknowledgement message for the existing control message. it only enforces ack timeout check after at least one valid ack is received, which helps keep compatibility with older version deployment, at the cost of not being able to detect issues happening very early and even before the first ack.
and the third commit is just tests added for this change. made them separate for easier review for the fix commit.
im open to discuss what is the desired solution so feel free to debug the test failure yourself. i also have a minimal repro python script which involves 2 real v2ray instances running locally but i suppose that's more difficult to debug than this. i can share that too if needed.