Skip to content

Commit

Permalink
Add missing Dispose() calls (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpursley authored Apr 29, 2024
1 parent 07a59e7 commit b50aed2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/KubernetesClient/Kubernetes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ protected virtual void Dispose(bool disposing)

// Dispose the client
HttpClient?.Dispose();
HttpClient = null;

// Dispose the certificates
if (CaCerts is not null)
Expand All @@ -221,11 +222,13 @@ protected virtual void Dispose(bool disposing)
CaCerts.Clear();
}


ClientCert?.Dispose();
ClientCert = null;

HttpClient = null;
FirstMessageHandler?.Dispose();
FirstMessageHandler = null;

HttpClientHandler?.Dispose();
HttpClientHandler = null;
}
}
Expand Down

0 comments on commit b50aed2

Please sign in to comment.