File tree Expand file tree Collapse file tree
src/main/java/cn/beecp/pool Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -424,8 +424,7 @@ private PooledConnection getPooledConnection() throws SQLException {
424424 boolean failed = false ;
425425 Throwable cause = null ;
426426 deadline += this .maxWaitNs ;
427- Thread thd = b .thread ;
428-
427+
429428 do {
430429 Object s = b .state ;//PooledConnection,Throwable,BOWER_NORMAL
431430 if (s instanceof PooledConnection ) {
@@ -452,7 +451,7 @@ private PooledConnection getPooledConnection() throws SQLException {
452451 LockSupport .unpark (this );
453452
454453 LockSupport .parkNanos (t );//block exit:1:get transfer 2:timeout 3:interrupted
455- if (thd . isInterrupted ()) {
454+ if (Thread . interrupted ()) {//auto clear interrupted status
456455 failed = true ;
457456 cause = new SQLException ("Interrupted during getting connection" );
458457 BorrowStUpd .compareAndSet (b , BOWER_WAITING , cause );
You can’t perform that action at this time.
0 commit comments