fix connection pool bug

This commit is contained in:
Looly
2025-06-09 16:41:39 +08:00
parent ea09b76332
commit 8be799e685
2 changed files with 11 additions and 1 deletions

View File

@@ -99,6 +99,16 @@ public class PooledConnection extends ConnectionWrapper {
return this.isClosed;
}
/**
* 打开连接
*
* @return this
*/
PooledConnection open() {
this.isClosed = false;
return this;
}
/**
* 销毁连接,即彻底关闭并丢弃连接
*/

View File

@@ -86,7 +86,7 @@ public class PooledDataSource extends AbstractDataSource {
@Override
public PooledConnection getConnection() throws SQLException {
return connPool.borrowObject();
return connPool.borrowObject().open();
}
@Override