Skip to content

Commit 6f4f791

Browse files
committed
[ci] Handle wait condition and write log if it fails
was previously ignored response value
1 parent 419ab4e commit 6f4f791

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/apache/ibatis/datasource/pooled/PooledDataSource.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@ private PooledConnection popConnection(String username, String password) throws
494494
log.debug("Waiting as long as " + poolTimeToWait + " milliseconds for connection.");
495495
}
496496
long wt = System.currentTimeMillis();
497-
condition.await(poolTimeToWait, TimeUnit.MILLISECONDS);
497+
if (!condition.await(poolTimeToWait, TimeUnit.MILLISECONDS)) {
498+
log.debug("Wait failed...");
499+
}
498500
state.accumulatedWaitTime += System.currentTimeMillis() - wt;
499501
} catch (InterruptedException e) {
500502
// set interrupt flag

0 commit comments

Comments
 (0)