Fixed - connection ping handler doesn't use commandTimeout. #5493

pull/5599/head
Nikita Koksharov 1 year ago
parent a66ac15e11
commit e7bdea6cd4

@ -62,7 +62,8 @@ public class PingConnectionHandler extends ChannelInboundHandlerAdapter {
RFuture<String> future;
CommandData<?, ?> currentCommand = connection.getCurrentCommand();
if (connection.getUsage() == 0 && (currentCommand == null || !currentCommand.isBlockingCommand())) {
future = connection.async(config.getPingConnectionInterval() / 2, StringCodec.INSTANCE, RedisCommands.PING);
int timeout = Math.max(config.getCommandTimeout(), config.getPingConnectionInterval() / 2);
future = connection.async(timeout, StringCodec.INSTANCE, RedisCommands.PING);
} else {
future = null;
}

Loading…
Cancel
Save