mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for async close
This commit is contained in:
@@ -1085,8 +1085,14 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
|
||||
}
|
||||
|
||||
public void checkState() throws SQLException {
|
||||
boolean asyncCloseEnable = this.getConnectionHolder().getDataSource().isAsyncCloseConnectionEnable();
|
||||
if (asyncCloseEnable) {
|
||||
final boolean asyncCloseEnabled;
|
||||
if (holder != null) {
|
||||
asyncCloseEnabled = holder.getDataSource().isAsyncCloseConnectionEnable();
|
||||
} else {
|
||||
asyncCloseEnabled = false;
|
||||
}
|
||||
|
||||
if (asyncCloseEnabled) {
|
||||
synchronized (this) {
|
||||
checkStateInternal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user