Skip to content

Commit

Permalink
Merge pull request #326 from GoogleCloudPlatform/speech-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot authored Sep 1, 2016
2 parents ae4fb40 + 4762ef0 commit ba07e3c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
import com.google.longrunning.OperationsGrpc;

import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.StatusRuntimeException;
import io.grpc.auth.ClientAuthInterceptor;
import io.grpc.netty.NegotiationType;
import io.grpc.netty.NettyChannelBuilder;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
Expand Down Expand Up @@ -86,8 +85,7 @@ public static ManagedChannel createChannel(String host, int port) throws IOExcep
GoogleCredentials creds = GoogleCredentials.getApplicationDefault();
creds = creds.createScoped(OAUTH2_SCOPES);
ManagedChannel channel =
NettyChannelBuilder.forAddress(host, port)
.negotiationType(NegotiationType.TLS)
ManagedChannelBuilder.forAddress(host, port)
.intercept(new ClientAuthInterceptor(creds, Executors.newSingleThreadExecutor()))
.build();

Expand Down

0 comments on commit ba07e3c

Please sign in to comment.