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) {
|
private GrpcConnection(String name, SocketAddress socketAddress, URI address) {
|
||||||
super(name);
|
super(name);
|
||||||
var channelBuilder = NettyChannelBuilder
|
NettyChannelBuilder channelBuilder;
|
||||||
.forAddress(socketAddress)
|
if (socketAddress instanceof InetSocketAddress inetSocketAddress) {
|
||||||
|
channelBuilder = NettyChannelBuilder
|
||||||
|
.forAddress(inetSocketAddress.getHostString(), inetSocketAddress.getPort());
|
||||||
|
} else {
|
||||||
|
channelBuilder = NettyChannelBuilder
|
||||||
|
.forAddress(socketAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
channelBuilder
|
||||||
.directExecutor()
|
.directExecutor()
|
||||||
.usePlaintext();
|
.usePlaintext();
|
||||||
if (socketAddress instanceof DomainSocketAddress _) {
|
if (socketAddress instanceof DomainSocketAddress _) {
|
||||||
|
Loading…
Reference in New Issue
Block a user