Fix client connection
This commit is contained in:
parent
310f94d473
commit
47c3e31f75
@ -75,8 +75,16 @@ public class GrpcConnection extends BaseConnection implements RocksDBAPI {
|
||||
|
||||
private GrpcConnection(String name, SocketAddress socketAddress, URI address) {
|
||||
super(name);
|
||||
var channelBuilder = NettyChannelBuilder
|
||||
.forAddress(socketAddress)
|
||||
NettyChannelBuilder channelBuilder;
|
||||
if (socketAddress instanceof InetSocketAddress inetSocketAddress) {
|
||||
channelBuilder = NettyChannelBuilder
|
||||
.forAddress(inetSocketAddress.getHostString(), inetSocketAddress.getPort());
|
||||
} else {
|
||||
channelBuilder = NettyChannelBuilder
|
||||
.forAddress(socketAddress);
|
||||
}
|
||||
|
||||
channelBuilder
|
||||
.directExecutor()
|
||||
.usePlaintext();
|
||||
if (socketAddress instanceof DomainSocketAddress _) {
|
||||
|
Loading…
Reference in New Issue
Block a user