Skip to content

Commit 54e2e7b

Browse files
committed
better keep alive
1 parent 147bb9e commit 54e2e7b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/main/java/tech/ydb/core/impl/pool/NettyChannelFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public ManagedChannel newManagedChannel(String host, int port, String sslHostOve
8787
}
8888

8989
if (grpcKeepAliveTimeMillis != null) {
90-
channelBuilder.keepAliveTime(grpcKeepAliveTimeMillis, TimeUnit.MILLISECONDS);
90+
channelBuilder.keepAliveTime(grpcKeepAliveTimeMillis, TimeUnit.MILLISECONDS)
91+
.keepAliveWithoutCalls(true);
9192
}
9293

9394
if (retryEnabled) {

core/src/main/java/tech/ydb/core/impl/pool/ShadedNettyChannelFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public ManagedChannel newManagedChannel(String host, int port, String sslHostOve
8787
}
8888

8989
if (grpcKeepAliveTimeMillis != null) {
90-
channelBuilder.keepAliveTime(grpcKeepAliveTimeMillis, TimeUnit.MILLISECONDS);
90+
channelBuilder.keepAliveTime(grpcKeepAliveTimeMillis, TimeUnit.MILLISECONDS)
91+
.keepAliveWithoutCalls(true);
9192
}
9293

9394
if (retryEnabled) {

0 commit comments

Comments
 (0)