diff --git a/src/main/java/cn/beecp/pool/FastConnectionPool.java b/src/main/java/cn/beecp/pool/FastConnectionPool.java index 581765ee7..ebd69a071 100644 --- a/src/main/java/cn/beecp/pool/FastConnectionPool.java +++ b/src/main/java/cn/beecp/pool/FastConnectionPool.java @@ -424,8 +424,7 @@ private PooledConnection getPooledConnection() throws SQLException { boolean failed = false; Throwable cause = null; deadline += this.maxWaitNs; - Thread thd = b.thread; - + do { Object s = b.state;//PooledConnection,Throwable,BOWER_NORMAL if (s instanceof PooledConnection) { @@ -452,7 +451,7 @@ private PooledConnection getPooledConnection() throws SQLException { LockSupport.unpark(this); LockSupport.parkNanos(t);//block exit:1:get transfer 2:timeout 3:interrupted - if (thd.isInterrupted()) { + if (Thread.interrupted()) {//auto clear interrupted status failed = true; cause = new SQLException("Interrupted during getting connection"); BorrowStUpd.compareAndSet(b, BOWER_WAITING, cause);