Skip to content

Confusing message on Http timeout #67505

@danmoseley

Description

@danmoseley

From some test failures I noticed:

NuGet.Protocol.Core.Types.FatalProtocolException : An error occurred while retrieving package metadata for 'Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.2' from source 'dotnet-public'.
---- System.Threading.Tasks.TaskCanceledException : The request was canceled due to the configured HttpClient.Timeout of -0.001 seconds elapsing.
-------- System.TimeoutException : The operation was canceled.
------------ System.Threading.Tasks.TaskCanceledException : The operation was canceled.
---------------- System.TimeoutException : A connection could not be established within the configured ConnectTimeout.

Apparently the timeout was set to Timeout.InfiniteTimeSpan, which is -1 ms. Presumably this couldn't have expired, so the message is confusing. I don't have a repro, so feel free to close if it's not important.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions