File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 33
33
34
34
import io .grpc .netty .GrpcSslContexts ;
35
35
import io .grpc .netty .NettyServerBuilder ;
36
+ import io .netty .channel .epoll .EpollEventLoopGroup ;
36
37
import io .netty .channel .epoll .EpollServerDomainSocketChannel ;
37
38
import io .netty .channel .unix .DomainSocketAddress ;
38
39
import io .netty .handler .ssl .SslContextBuilder ;
@@ -66,7 +67,9 @@ protected NettyServerBuilder newServerBuilder() {
66
67
if (address .startsWith (GrpcServerProperties .DOMAIN_SOCKET_ADDRESS_PREFIX )) {
67
68
return NettyServerBuilder
68
69
.forAddress (new DomainSocketAddress (address .substring (GrpcServerProperties .DOMAIN_SOCKET_ADDRESS_PREFIX .length ())))
69
- .channelType (EpollServerDomainSocketChannel .class );
70
+ .channelType (EpollServerDomainSocketChannel .class )
71
+ .bossEventLoopGroup (new EpollEventLoopGroup (1 ))
72
+ .workerEventLoopGroup (new EpollEventLoopGroup ());
70
73
} else if (GrpcServerProperties .ANY_IP_ADDRESS .equals (address )) {
71
74
return NettyServerBuilder .forPort (port );
72
75
} else {
Original file line number Diff line number Diff line change 33
33
34
34
import io .grpc .netty .shaded .io .grpc .netty .GrpcSslContexts ;
35
35
import io .grpc .netty .shaded .io .grpc .netty .NettyServerBuilder ;
36
+ import io .grpc .netty .shaded .io .netty .channel .epoll .EpollEventLoopGroup ;
36
37
import io .grpc .netty .shaded .io .netty .channel .epoll .EpollServerDomainSocketChannel ;
37
38
import io .grpc .netty .shaded .io .netty .channel .unix .DomainSocketAddress ;
38
39
import io .grpc .netty .shaded .io .netty .handler .ssl .SslContextBuilder ;
@@ -67,7 +68,9 @@ protected NettyServerBuilder newServerBuilder() {
67
68
if (address .startsWith (GrpcServerProperties .DOMAIN_SOCKET_ADDRESS_PREFIX )) {
68
69
return NettyServerBuilder
69
70
.forAddress (new DomainSocketAddress (address .substring (GrpcServerProperties .DOMAIN_SOCKET_ADDRESS_PREFIX .length ())))
70
- .channelType (EpollServerDomainSocketChannel .class );
71
+ .channelType (EpollServerDomainSocketChannel .class )
72
+ .bossEventLoopGroup (new EpollEventLoopGroup (1 ))
73
+ .workerEventLoopGroup (new EpollEventLoopGroup ());
71
74
} else if (GrpcServerProperties .ANY_IP_ADDRESS .equals (address )) {
72
75
return NettyServerBuilder .forPort (port );
73
76
} else {
You can’t perform that action at this time.
0 commit comments