wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r182782090
########## File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java ########## @@ -62,7 +77,16 @@ private static HttpClientOptions createHttpClientOptions() { } public void send(Invocation invocation, AsyncResponse asyncResp) throws Exception { - HttpClientWithContext httpClientWithContext = clientMgr.findClientPool(invocation.isSync()); + URIEndpointObject endpoint = (URIEndpointObject) invocation.getEndpoint().getAddress(); + HttpClientWithContext httpClientWithContext; + if (endpoint.isHttp2Enabled()) { + httpClientWithContext = clientMgrHttp2.findClientPool(invocation.isSync()); + if (!endpoint.isSslEnabled()) { + ((HttpClientImpl) httpClientWithContext.getHttpClient()).getOptions().setHttp2ClearTextUpgrade(false); Review comment: multi invocation will share the same httpClient instance when use http2 so there is concurrence problem here, right? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services