code: func (d *kubeDockerClient) holdHijackedConnection(tty bool, inputStream io.Reader, outputStream, errorStream io.Writer, resp dockertypes.HijackedResponse) error {
  	receiveStdout := make(chan error)
  	if outputStream != nil || errorStream != nil {
  		go func() {
  			receiveStdout <- d.redirectResponseToOutputStream(tty, outputStream, errorStream, resp.Reader)
  		}()
  	}
  
  	stdinDone := make(chan struct{})
  	go func() {
  		if inputStream != nil {
  			io.Copy(resp.Conn, inputStream)
  		}
  		resp.CloseWrite()
  		close(stdinDone)
  	}()
  
  	select {
  	case err := <-receiveStdout:
  		return err
  	case <-stdinDone:
  		if outputStream != nil || errorStream != nil {
  			return <-receiveStdout
  		}
  	}
  	return nil
  }
docs: // holdHijackedConnection hold the HijackedResponse, redirect the inputStream to the connection, and redirect the response
  // stream to stdout and stderr. NOTE: If needed, we could also add context in this function.