Skip to content

Commit

Permalink
switch from NettyChannelBuilder to ManagedChannelBuilder (googleapis#208
Browse files Browse the repository at this point in the history
)
  • Loading branch information
neozwu committed Mar 8, 2017
1 parent 38c0546 commit 67efe6d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
import com.google.common.collect.Lists;
import io.grpc.ClientInterceptor;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.auth.ClientAuthInterceptor;
import io.grpc.netty.NegotiationType;
import io.grpc.netty.NettyChannelBuilder;
import java.io.IOException;
import java.util.List;
import java.util.Properties;
Expand Down Expand Up @@ -116,8 +115,7 @@ private ManagedChannel createChannel(Executor executor) throws IOException {
interceptors.add(new ClientAuthInterceptor(credentialsProvider.getCredentials(), executor));
interceptors.add(new HeaderInterceptor(serviceHeader()));

return NettyChannelBuilder.forAddress(serviceAddress, port)
.negotiationType(NegotiationType.TLS)
return ManagedChannelBuilder.forAddress(serviceAddress, port)
.intercept(interceptors)
.executor(executor)
.build();
Expand Down

0 comments on commit 67efe6d

Please sign in to comment.