Skip to content

Commit

Permalink
fix: use java 1.8 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Mar 5, 2024
1 parent 7148e0a commit f620045
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ingester-grpc/src/main/java/io/greptime/rpc/GrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,10 @@ private IdChannel newChannel(Endpoint endpoint) {
NettyChannelBuilder innerChannelBuilder =
NettyChannelBuilder.forAddress(endpoint.getAddr(), endpoint.getPort());

if (this.opts.getTlsOptions().isEmpty()) {
innerChannelBuilder.usePlaintext();
} else {
if (this.opts.getTlsOptions().isPresent()) {
innerChannelBuilder.useTransportSecurity().sslContext(newSslContext(this.opts.getTlsOptions().get()));
} else {
innerChannelBuilder.usePlaintext();
}

ManagedChannel innerChannel = innerChannelBuilder.executor(this.asyncPool) //
Expand Down

0 comments on commit f620045

Please sign in to comment.