Skip to content

Minor fix for CancellationToken handling between retries - #509

Merged
MattB (MattB-msft) merged 1 commit into
masterfrom
release/update/250502071537
May 2, 2025
Merged

MattB (MattB-msft) merged 1 commit into
masterfrom
release/update/250502071537

Conversation

@tehcrashxor

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Member Author

Fix for #508

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