mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed : after real connection closed, closePoolableStatementError
This commit is contained in:
@@ -81,6 +81,10 @@ public class PoolableConnection implements PooledConnection, Connection {
|
||||
}
|
||||
|
||||
void closePoolableStatement(PoolablePreparedStatement stmt) throws SQLException {
|
||||
if (this.isClosed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PreparedStatement rawStatement = stmt.getRawPreparedStatement();
|
||||
|
||||
try {
|
||||
@@ -88,6 +92,10 @@ public class PoolableConnection implements PooledConnection, Connection {
|
||||
} catch (SQLException ex) {
|
||||
LOG.error("clear parameter error", ex);
|
||||
}
|
||||
|
||||
if (holder == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (holder.isPoolPreparedStatements()) {
|
||||
stmt.clearResultSet();
|
||||
|
||||
Reference in New Issue
Block a user