Skip to content

Commit b50aed2

Browse files
authored
Add missing Dispose() calls (#1552)
1 parent 07a59e7 commit b50aed2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/KubernetesClient/Kubernetes.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ protected virtual void Dispose(bool disposing)
209209

210210
// Dispose the client
211211
HttpClient?.Dispose();
212+
HttpClient = null;
212213

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

224-
225225
ClientCert?.Dispose();
226+
ClientCert = null;
226227

227-
HttpClient = null;
228+
FirstMessageHandler?.Dispose();
228229
FirstMessageHandler = null;
230+
231+
HttpClientHandler?.Dispose();
229232
HttpClientHandler = null;
230233
}
231234
}

0 commit comments

Comments
 (0)