ConnectionPool.get should return failed future in case of free connection absence. #262

pull/303/head
Nikita 9 years ago
parent e7ca9452e2
commit bbef215c11

@ -128,9 +128,12 @@ public class ConnectionPool<T extends RedisConnection> {
} }
} }
Promise<T> promise = connectionManager.newPromise(); RedisConnectionException exception = new RedisConnectionException(
promises.add(promise); "Can't aquire connection from pool");
return promise; return connectionManager.newFailedFuture(exception);
// Promise<T> promise = connectionManager.newPromise();
// promises.add(promise);
// return promise;
} }
public Future<T> get(ClientConnectionsEntry entry) { public Future<T> get(ClientConnectionsEntry entry) {

Loading…
Cancel
Save