Skip to content

Commit 4d93678

Browse files
authored
Update ShadedNettyGrpcServerFactory.java
1 parent bfb78b3 commit 4d93678

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/ShadedNettyGrpcServerFactory.java

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

0 commit comments

Comments
 (0)