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