From 314a9c4a6215b7e57944c86acacc5c75ab55121f Mon Sep 17 00:00:00 2001 From: adamzhoul <770822772@qq.com> Date: Mon, 11 Jan 2021 08:36:27 +0000 Subject: [PATCH] fix replyChan block --- .../k8s.io/client-go/tools/remotecommand/remotecommand_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/client-go/tools/remotecommand/remotecommand_test.go b/staging/src/k8s.io/client-go/tools/remotecommand/remotecommand_test.go index 77e309d6199..d5485af82cd 100644 --- a/staging/src/k8s.io/client-go/tools/remotecommand/remotecommand_test.go +++ b/staging/src/k8s.io/client-go/tools/remotecommand/remotecommand_test.go @@ -208,7 +208,8 @@ func createHTTPStreams(w http.ResponseWriter, req *http.Request, opts *StreamOpt } // wait for stream - replyChan := make(chan struct{}, 1) + replyChan := make(chan struct{}, 4) + defer close(replyChan) receivedStreams := 0 expectedStreams := 1 if opts.Stdout != nil {