Skip to content

Commit

Permalink
Update HttpClient ApiClient
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-petersen committed Oct 15, 2024
1 parent 69b59eb commit 62868a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ namespace {{packageName}}.Client
try
{
if (configuration.Timeout > 0)
if (configuration.Timeout > TimeSpan.Zero)
{
timeoutTokenSource = new CancellationTokenSource(configuration.Timeout);
finalTokenSource = CancellationTokenSource.CreateLinkedTokenSource(finalToken, timeoutTokenSource.Token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private async Task<ApiResponse<T>> ExecAsync<T>(HttpRequestMessage req,

try
{
if (configuration.Timeout > 0)
if (configuration.Timeout > TimeSpan.Zero)
{
timeoutTokenSource = new CancellationTokenSource(configuration.Timeout);
finalTokenSource = CancellationTokenSource.CreateLinkedTokenSource(finalToken, timeoutTokenSource.Token);
Expand Down

0 comments on commit 62868a9

Please sign in to comment.