mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-08 22:58:05 +08:00
fix close
This commit is contained in:
parent
3fe722554c
commit
6e871a1fae
@ -12,6 +12,7 @@
|
||||
### 🐞Bug修复
|
||||
* 【extra 】 修复TinyPinyinEngine空构造造成可能的误判问题
|
||||
* 【http 】 修复在gzip模式下Content-Length服务端设置异常导致的阶段
|
||||
* 【db 】 修复PooledDataSource关闭逻辑错误问题
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -147,11 +147,9 @@ public class PooledDataSource extends AbstractDataSource {
|
||||
@Override
|
||||
synchronized public void close() {
|
||||
if (CollectionUtil.isNotEmpty(this.freePool)) {
|
||||
for (PooledConnection pooledConnection : freePool) {
|
||||
pooledConnection.release();
|
||||
this.freePool.clear();
|
||||
this.freePool = null;
|
||||
}
|
||||
this.freePool.forEach(PooledConnection::release);
|
||||
this.freePool.clear();
|
||||
this.freePool = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user