refactoring

pull/1871/head
Nikita Koksharov 6 years ago
parent cc101560f0
commit 1b8849f522

@ -712,7 +712,6 @@ public class CommandAsyncService implements CommandAsyncExecutor {
+ ", command: " + command + ", command params: " + LogHelper.toString(details.getParams())
+ " after " + details.getAttempt() + " retry attempts"));
}
connectionManager.getShutdownLatch().release();
} else {
if (details.getConnectionFuture().isSuccess()) {
if (details.getWriteFuture() == null || !details.getWriteFuture().isDone()) {
@ -781,6 +780,7 @@ public class CommandAsyncService implements CommandAsyncExecutor {
@Override
public void operationComplete(Future<RedisConnection> connFuture) throws Exception {
if (connFuture.isCancelled()) {
connectionManager.getShutdownLatch().release();
return;
}

@ -691,7 +691,6 @@ public class CommandBatchService extends CommandAsyncService {
details.setException(new RedisTimeoutException("Unable to get connection! "
+ "Node source: " + source + " after " + attempts + " retry attempts"));
}
connectionManager.getShutdownLatch().release();
} else {
if (connectionFuture.isSuccess()) {
if (details.getWriteFuture() == null || !details.getWriteFuture().isDone()) {
@ -859,6 +858,7 @@ public class CommandBatchService extends CommandAsyncService {
RFuture<RedisConnection> connFuture, final boolean noResult, final long responseTimeout, final int attempts,
ExecutionMode executionMode, final AtomicInteger slots) {
if (connFuture.isCancelled()) {
connectionManager.getShutdownLatch().release();
return;
}

Loading…
Cancel
Save