Skip to content

Commit b8390f9

Browse files
committed
fix: usage of Timeout.Infinite as milliseconds
This has been missed in the PCL code review. Timeout.Infinite is milliseconds however new TimeSpan() takes ticks.
1 parent e2ef0cc commit b8390f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Docker.DotNet/DockerClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ internal async Task<DockerApiResponse> MakeRequestAsync(IEnumerable<ApiResponseE
8282

8383
internal async Task<Stream> MakeRequestForStreamAsync(IEnumerable<ApiResponseErrorHandlingDelegate> errorHandlers, HttpMethod method, string path, IQueryString queryString, IDictionary<string, string> headers, IRequestContent data, CancellationToken cancellationToken)
8484
{
85-
HttpResponseMessage response = await MakeRequestInnerAsync(new TimeSpan?(new TimeSpan(Timeout.Infinite)), HttpCompletionOption.ResponseHeadersRead, method, path, queryString, headers, data, cancellationToken);
85+
HttpResponseMessage response = await MakeRequestInnerAsync(TimeSpan.FromMilliseconds(Timeout.Infinite), HttpCompletionOption.ResponseHeadersRead, method, path, queryString, headers, data, cancellationToken);
8686
HandleIfErrorResponse(response.StatusCode, null, errorHandlers);
8787
return await response.Content.ReadAsStreamAsync();
8888
}

0 commit comments

Comments
 (0)