Skip to content

Minor fix for CancellationToken handling between retries #509

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

tehcrashxor
Copy link
Member

Code Improvements:

  • Added CancellationToken support and parameter to internal static async Task<int> RetryRequest(OrganizationRequest req, [...]) in src/GeneralTools/DataverseClient/Client/Utils/Utils.cs to cancel the Task.Delay between request retries.
  • Updated internal async Task<OrganizationResponse> Command_ExecuteAsyncImpl(OrganizationRequest req, [...]) in src/GeneralTools/DataverseClient/Client/ServiceClient.cs to properly throw aOperationCanceledException when the CancelaltionToken is cancelled, including a race condition where the cancellation could occur within the catch

@tehcrashxor tehcrashxor requested a review from MattB-msft May 2, 2025 19:56
@tehcrashxor
Copy link
Member Author

Fix for #508

@MattB-msft MattB-msft merged commit 7bc77a7 into master May 2, 2025
@MattB-msft MattB-msft linked an issue May 2, 2025 that may be closed by this pull request
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.

CancellationToken is not respected during retry delay
2 participants