mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for multi-thread use one connection.
This commit is contained in:
@@ -1679,8 +1679,13 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
|
||||
if (requireDiscard) {
|
||||
if (holder.statementTrace != null) {
|
||||
for (Statement stmt : holder.statementTrace) {
|
||||
JdbcUtils.close(stmt);
|
||||
holder.lock.lock();
|
||||
try {
|
||||
for (Statement stmt : holder.statementTrace) {
|
||||
JdbcUtils.close(stmt);
|
||||
}
|
||||
} finally {
|
||||
holder.lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user