|
|
|
@ -22,6 +22,7 @@ import org.redisson.api.RFuture;
|
|
|
|
|
import org.redisson.client.RedisClientConfig;
|
|
|
|
|
import org.redisson.client.RedisConnection;
|
|
|
|
|
import org.redisson.client.codec.StringCodec;
|
|
|
|
|
import org.redisson.client.protocol.CommandData;
|
|
|
|
|
import org.redisson.client.protocol.RedisCommands;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
@ -69,6 +70,12 @@ public class PingConnectionHandler extends ChannelInboundHandlerAdapter {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CommandData<?, ?> commandData = connection.getCurrentCommand();
|
|
|
|
|
if (commandData != null && commandData.isBlockingCommand()) {
|
|
|
|
|
sendPing(ctx);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (connection.getUsage() == 0
|
|
|
|
|
&& future != null
|
|
|
|
|
&& (future.cancel(false) || !future.isSuccess())) {
|
|
|
|
|