mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-18 08:09:40 +00:00
Merge pull request #131642 from pohly/e2e-pod-exec-logging
client-go remotecommand: avoid "unexpected error" log when there is no error Kubernetes-commit: 460a84a5daef3a8c0f67797aa475c9adfaf0722a
This commit is contained in:
@@ -52,7 +52,7 @@ func (f *FallbackExecutor) Stream(options StreamOptions) error {
|
||||
// initial primary call to upgrade to a websocket connection fails.
|
||||
func (f *FallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error {
|
||||
err := f.primary.StreamWithContext(ctx, options)
|
||||
if f.shouldFallback(err) {
|
||||
if err != nil && f.shouldFallback(err) {
|
||||
klog.V(4).Infof("RemoteCommand fallback: %v", err)
|
||||
return f.secondary.StreamWithContext(ctx, options)
|
||||
}
|
||||
|
Reference in New Issue
Block a user