|
@@ -137,13 +137,11 @@ public class SimpleDataSource implements DataSource, AutoCloseable {
|
|
|
|
|
|
public void close(Connection connection) {
|
|
public void close(Connection connection) {
|
|
if (connection != null && connection instanceof SimpleConnection) {
|
|
if (connection != null && connection instanceof SimpleConnection) {
|
|
-
|
|
|
|
- activeNum.decrementAndGet();
|
|
|
|
-
|
|
|
|
SimpleConnection simpleConnection = (SimpleConnection) connection;
|
|
SimpleConnection simpleConnection = (SimpleConnection) connection;
|
|
// 连接过期
|
|
// 连接过期
|
|
if (isExpired(simpleConnection)) {
|
|
if (isExpired(simpleConnection)) {
|
|
simpleConnection.close();
|
|
simpleConnection.close();
|
|
|
|
+ activeNum.decrementAndGet();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|