Skip to content

Commit 4735ea9

Browse files
alex-zylAliaksandr Zyl
authored and
Aliaksandr Zyl
committed
Fixed GenericClient not propagating parameters into WatchAsync
1 parent b198b02 commit 4735ea9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/KubernetesClient/GenericClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ public async Task<T> ReplaceNamespacedAsync<T>(T obj, string ns, string name, Ca
116116
where T : IKubernetesObject
117117
{
118118
var respTask = kubernetes.CustomObjects.ListClusterCustomObjectWithHttpMessagesAsync<T>(group, version, plural, watch: true, cancellationToken: cancel);
119-
return respTask.WatchAsync<T, T>();
119+
return respTask.WatchAsync<T, T>(onError, cancel);
120120
}
121121

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

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

0 commit comments

Comments
 (0)