Skip to content

Commit 32f1e72

Browse files
authored
Update NettyGrpcServerFactory.java
1 parent 4d93678 commit 32f1e72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory/NettyGrpcServerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public NettyGrpcServerFactory(final GrpcServerProperties properties,
6363
protected NettyServerBuilder newServerBuilder() {
6464
final String address = getAddress();
6565
final int port = getPort();
66-
if (address.startsWith("unix://")) {
66+
if (address.startsWith(GrpcServerProperties.DOMAIN_SOCKET_ADDRESS_PREFIX)) {
6767
return NettyServerBuilder
68-
.forAddress(new DomainSocketAddress(address.substring(7)))
68+
.forAddress(new DomainSocketAddress(address.substring(GrpcServerProperties.DOMAIN_SOCKET_ADDRESS_PREFIX.length())))
6969
.channelType(EpollServerDomainSocketChannel.class);
7070
} else if (GrpcServerProperties.ANY_IP_ADDRESS.equals(address)) {
7171
return NettyServerBuilder.forPort(port);

0 commit comments

Comments
 (0)