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 13
13
14
14
import io .netty .channel .EventLoop ;
15
15
import io .vertx .core .*;
16
+ import io .vertx .core .http .ConnectionPoolTooBusyException ;
16
17
import io .vertx .core .impl .ContextInternal ;
17
18
import io .vertx .core .impl .EventLoopContext ;
18
19
import io .vertx .core .impl .VertxInternal ;
@@ -217,12 +218,10 @@ public void onEnqueue(PoolWaiter<PooledConnection> waiter) {
217
218
if (timeout > 0L && timerID == -1L ) {
218
219
timerID = context .setTimer (timeout , id -> {
219
220
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" )));
224
223
} else {
225
- // ????
224
+ handler . handle ( Future . failedFuture ( new ConnectionPoolTooBusyException ( "Failed to cancel pool request after timeout while waiting for connection" )));
226
225
}
227
226
});
228
227
});
You can’t perform that action at this time.
0 commit comments