Skip to content

Commit

Permalink
Fixed GenericClient not propagating parameters into WatchAsync (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-zyl authored Jan 15, 2024
1 parent b198b02 commit 29f6d38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/KubernetesClient/GenericClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ public async Task<T> ReplaceNamespacedAsync<T>(T obj, string ns, string name, Ca
where T : IKubernetesObject
{
var respTask = kubernetes.CustomObjects.ListClusterCustomObjectWithHttpMessagesAsync<T>(group, version, plural, watch: true, cancellationToken: cancel);
return respTask.WatchAsync<T, T>();
return respTask.WatchAsync<T, T>(onError, cancel);
}

public IAsyncEnumerable<(WatchEventType, T)> WatchNamespacedAsync<T>(string ns, Action<Exception> onError = null, CancellationToken cancel = default)
where T : IKubernetesObject
{
var respTask = kubernetes.CustomObjects.ListNamespacedCustomObjectWithHttpMessagesAsync<T>(group, version, ns, plural, watch: true, cancellationToken: cancel);
return respTask.WatchAsync<T, T>();
return respTask.WatchAsync<T, T>(onError, cancel);
}

public Watcher<T> Watch<T>(Action<WatchEventType, T> onEvent, Action<Exception> onError = null, Action onClosed = null)
Expand Down

0 comments on commit 29f6d38

Please sign in to comment.