title: Fabric-sdk-go client.Query returns error: failed to create transactor: Channel_Cfg_Cache - cache is closed
body: <p>I am trying to make a simple demo using the fabric-sdk-go. I wonder anybod know why the code below ("client.Query") returns the error "failed to create transactor: Channel_Cfg_Cache - cache is closed"?</p>
  
  <hr>
  
  <pre><code>func initSdkClient() (*channel.Client){
      sdk, err := fabsdk.New(config.FromFile("config.yaml"))
      if err != nil {
          logger.Fatalf("Failed to create new SDK: %s", err)
      }
      defer sdk.Close()
  
      //prepare channel client context using client context
      clientChannelContext := sdk.ChannelContext(channelID, fabsdk.WithUser("User1"), fabsdk.WithOrg(orgName))
      // Channel client is used to query and execute transactions (Org1 is default org)
      client, err := channel.New(clientChannelContext)
      if err != nil {
          logger.Fatalf("Failed to create new channel client: %s", err)
      }
      return client
  }
  
  func queryCC(client *channel.Client, targetEndpoints ...string) []byte {
      response, err := client.Query(channel.Request{ChaincodeID: ccID, Fcn: "invoke", Args: defaultQueryArgs},
          channel.WithRetry(retry.DefaultChannelOpts),
          channel.WithTargetEndpoints(targetEndpoints...),
      )
      if err != nil {
          ***logger.Fatalf("Failed to query funds: %s", err)*** // error: failed to create transactor: Channel_Cfg_Cache - cache is closed
      }
      return response.Payload
  }
  
  func main() {
      client := initSdkClient()
  
      existingValue := queryCC(client)
      logger.Info(existingValue)
  
  
      logger.Info("hello, world\n")
  }
  </code></pre>