File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
vertx-sql-client/src/main/java/io/vertx/sqlclient/impl/pool Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1313
1414import io .netty .channel .EventLoop ;
1515import io .vertx .core .*;
16+ import io .vertx .core .http .ConnectionPoolTooBusyException ;
1617import io .vertx .core .impl .ContextInternal ;
1718import io .vertx .core .impl .EventLoopContext ;
1819import io .vertx .core .impl .VertxInternal ;
@@ -217,12 +218,10 @@ public void onEnqueue(PoolWaiter<PooledConnection> waiter) {
217218 if (timeout > 0L && timerID == -1L ) {
218219 timerID = context .setTimer (timeout , id -> {
219220 pool .cancel (waiter , ar -> {
220- if (ar .succeeded ()) {
221- if (ar .result ()) {
222- handler .handle (Future .failedFuture ("Timeout" ));
223- }
221+ if (ar .succeeded () && ar .result ()) {
222+ handler .handle (Future .failedFuture (new ConnectionPoolTooBusyException ("Timeout while waiting for connection" )));
224223 } else {
225- // ????
224+ handler . handle ( Future . failedFuture ( new ConnectionPoolTooBusyException ( "Failed to cancel pool request after timeout while waiting for connection" )));
226225 }
227226 });
228227 });
You can’t perform that action at this time.
0 commit comments