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.
Problem
MeasureOutboundDelaycan try the same URL twice. Each attempt had a separate 12-second HTTP client timeout, so a slow destination could keep a delay test running for up to about 24 seconds. The code also drained the body of an HTTP error before trying again, even after it had the error status.MeasureDelaytakes a snapshot of the running core. When the user stops the core during a connection check, the HTTP request can remain active afterStopLoopreturns.Fix
This fix is based on #212 and uses its lifecycle mutex. PR #212
context.DeadlineExceeded.StopLoopreturned while the probes were still active.context.Canceled. A probe succeeded after restarting the same controller.Verification
go test -race -shuffle=on -count=1 -v ./...with Go 1.27.4. The three regressions reproduced on currentmainand on Fix core start/stop deadlocks and race conditions in traffic stats #212. All four HTTP test groups passed after the fix.go vetpassed.mainatb80e254, which includes Fix Validate and bound TLS and QUIC certificate probes #213, with Fix weak WebSocket masking (GHSA-w67g-5rqw-f597) and improve Android build reliability #211 and Fix core start/stop deadlocks and race conditions in traffic stats #212 applied. The v2rayNG APK used the head of #6553. PR #211 · PR #213 · v2rayNG PR #6553