refactoring

pull/2323/head
Nikita Koksharov 5 years ago
parent 64d4ee5099
commit 094274a465

@ -180,7 +180,7 @@ public class RedisConnection implements RedisCommands {
}
public <T, R> RFuture<R> async(RedisCommand<T> command, Object... params) {
return async(null, command, params);
return async(-1, command, params);
}
public <T, R> RFuture<R> async(long timeout, RedisCommand<T> command, Object... params) {
@ -255,7 +255,7 @@ public class RedisConnection implements RedisCommands {
if (command != null && command.isBlockingCommand()) {
channel.close();
} else {
RFuture<Void> f = async(redisClient.getConfig().getCommandTimeout(), RedisCommands.QUIT);
RFuture<Void> f = async(RedisCommands.QUIT);
f.onComplete((res, e) -> {
channel.close();
});

@ -543,7 +543,7 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
return;
}
RFuture<String> r = connection.async(config.getTimeout(), RedisCommands.PING);
RFuture<String> r = connection.async(RedisCommands.PING);
r.onComplete((resp, exc) -> {
if (exc != null) {
result.tryFailure(exc);

Loading…
Cancel
Save