-
Notifications
You must be signed in to change notification settings - Fork 402
Closed
Description
Using the following code, I would expect an exception to be raised in 5 seconds. Instead I am getting a OperationCanceledException at 20 seconds.
If I remove the defaultTimeout argument from the DockerClientConfiguration constructor, I no longer get an OperationCanceledException, but I do get a HttpRequestException after 20 seconds.
No matter what I change, an exception is always raised at 20 seconds. This is the code I am using (the IP address will be set to a host that is offline/unavailable).
Using Docker.DotNet 3.125.2 / .Net Core 2.2.
var client = new DockerClientConfiguration( new Uri( $"http://X.X.X.X:2375" ), defaultTimeout: TimeSpan.FromSeconds( 5 ) ).CreateClient();
var containers = await client.Containers.ListContainersAsync( new ContainersListParameters
{
All = true
},
default );
Metadata
Metadata
Assignees
Labels
No labels