Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #58 from dev-tony-hu/main
Browse files Browse the repository at this point in the history
Update RetryHandler.cs
  • Loading branch information
andrueastman authored Dec 1, 2022
2 parents 0448f72 + 52edabe commit bedb5a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [1.0.0-preview.12] - 2022-12-01

### Changed

- Fixes RetryHandler to return the real wait time

## [1.0.0-preview.11] - 2022-10-17

### Changed

- Changes the ResponeHandler parameter in IRequestAdapter to be a RequestOption
- Changes the ResponseHandler parameter in IRequestAdapter to be a RequestOption

## [1.0.0-preview.10] - 2022-09-19

Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Kiota.Http.HttpClientLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>preview.11</VersionSuffix>
<VersionSuffix>preview.12</VersionSuffix>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<!-- Enable this line once we go live to prevent breaking changes -->
<!-- <PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion> -->
<SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<PackageReleaseNotes>
- Changes the ResponeHandler parameter in IRequestAdapter to be a RequestOption
- Fixes RetryHandler to return the real wait time
</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/RetryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ internal Task Delay(HttpResponseMessage response, int retryCount, int delay, out
}

TimeSpan delayTimeSpan = TimeSpan.FromSeconds(Math.Min(delayInSeconds, RetryHandlerOption.MaxDelay));
delayInSeconds=delayTimeSpan.TotalSeconds;
return Task.Delay(delayTimeSpan, cancellationToken);
}

Expand Down

0 comments on commit bedb5a2

Please sign in to comment.