Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Correct cancellation token usage in UserProxyAgent docstring #4874

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

w121211
Copy link
Contributor

@w121211 w121211 commented Jan 1, 2025

Why are these changes needed?

The example code in UserProxyAgent's docstring has a bug where timeout handling doesn't work. The code creates a new CancellationToken instead of using the shared token that gets cancelled by the timeout callback, making the timeout ineffective.

Related issue number

Checks

Copy link
Member

@jackgerrits jackgerrits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.20%. Comparing base (16ceded) to head (8afabac).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4874      +/-   ##
==========================================
- Coverage   68.21%   68.20%   -0.02%     
==========================================
  Files         158      158              
  Lines        9960     9960              
==========================================
- Hits         6794     6793       -1     
- Misses       3166     3167       +1     
Flag Coverage Δ
unittests 68.20% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackgerrits jackgerrits merged commit a1d782d into microsoft:main Jan 2, 2025
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants