Skip to content

Commit 106084f

Browse files
committed
Endpoint port validation in GrpcTransport
1 parent 7ed924a commit 106084f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/tech/ydb/core/impl/YdbTransportImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static EndpointRecord getDiscoveryEndpoint(GrpcTransportBuilder builder) {
126126
+ "endpoint " + builder.getEndpoint() + " and empty host " + builder.getHost());
127127
}
128128

129-
if (endpointURI.getPort() == -1) {
129+
if (endpointURI.getPort() < 0) {
130130
throw new IllegalArgumentException("Can't create discovery rpc, port is not specified for "
131131
+ "endpoint " + builder.getEndpoint());
132132
}

0 commit comments

Comments
 (0)