Fail the callback in case we cannot activate a newly created connection.

This commit is contained in:
Simone Bordet 2015-02-09 12:11:18 +01:00
parent 43f14997d8
commit 2a749dc0ea
1 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,8 @@ public class ConnectionPool implements Closeable, Dumpable
LOG.debug("Connection {}/{} creation succeeded {}", next, maxConnections, connection);
if (activate(connection))
connectionPromise.succeeded(connection);
else
connectionPromise.failed(new IllegalStateException("Active connection overflow"));
}
@Override