Repository navigation
Conversation
Keep in-flight unlimited-concurrency replay tasks visible to KeepServing. Co-authored-by: generaltony007 <[email protected]>
Cover blocked replay tasks and held localhost responses in serial and unlimited modes. Co-authored-by: generaltony007 <[email protected]>
Co-authored-by: generaltony007 <[email protected]>
Co-authored-by: generaltony007 <[email protected]>
Contributor
Author
|
Could a maintainer give this concurrent client-replay lifetime fix a human review and advise on the next step? Please let me know if changes are needed or if you'd prefer this PR closed. Thanks. |
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.
Description
Include active
replay_tasksinreplay.client.count, alongside the queue and serial in-flight request.With
client_replay_concurrency=-1, the playback worker removes requests from the queue as soon as it starts their tasks. The count can then become zero while those tasks still wait for responses.KeepServinguses this command to decide when mitmdump can stop, and replay connections are not tracked inProxyserver.connections.The change keeps mitmdump running until these replays finish. It does not change concurrency limits or cancellation behavior.
Tests cover one and three blocked concurrent tasks, plus a real localhost TCP server that holds its response. The TCP test checks both serial and unlimited modes, the command result,
KeepServing.keepgoing(), and completion returning the count to zero.Validation on main
3f81168:test/mitmproxysuite: 2022 passed, 2 skipped, 1 environment failure creating a TUN device. That same TUN test fails on unchanged source.uv run tox -e lint: passed.Checklist