Skip to content

Commit 6317bf0

Browse files
committed
fix: Don't dispose the certificate we're not the owner
1 parent 7265ce7 commit 6317bf0

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Run the following command in the "Package Manager Console":
2323
2424
**Visual Studio**
2525

26-
Right click to your project in Visual Studio, choose "Manage NuGet Packages" and search for "Docker.DotNet" and click "Install".
27-
(see [NuGet Gallery][nuget-gallery].)
26+
Right click to your project in Visual Studio, choose "Manage NuGet Packages" and search for "Docker.DotNet.Enhanced" and click "Install" (see [NuGet Gallery][nuget-gallery]).
2827

2928
**.NET Core Command Line Interface**
3029

@@ -75,9 +74,9 @@ DockerClient client = new DockerClientConfiguration(
7574

7675
```csharp
7776
IList<ContainerListResponse> containers = await client.Containers.ListContainersAsync(
78-
new ContainersListParameters
77+
new ContainersListParameters
7978
{
80-
Limit = 10,
79+
Limit = 10,
8180
});
8281
```
8382

src/Docker.DotNet.X509/CertificateCredentials.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ public class CertificateCredentials : Credentials
44
{
55
private readonly X509Certificate2 _certificate;
66

7-
private bool _disposed;
8-
97
public CertificateCredentials(X509Certificate2 certificate)
108
{
119
_certificate = certificate;
@@ -43,16 +41,5 @@ public override HttpMessageHandler GetHandler(HttpMessageHandler handler)
4341

4442
protected virtual void Dispose(bool disposing)
4543
{
46-
if (_disposed)
47-
{
48-
return;
49-
}
50-
51-
if (disposing)
52-
{
53-
_certificate.Dispose();
54-
}
55-
56-
_disposed = true;
5744
}
5845
}

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "3.128.0",
3+
"version": "3.128.1",
44
"nugetPackageVersion": {
55
"semVer": 2
66
},

0 commit comments

Comments
 (0)