Fix BZ51786.
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 14 Sep 2011 08:53:58 +0000 (08:53 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 14 Sep 2011 08:53:58 +0000 (08:53 +0000)
Discarded connection is not active in a pool any longer.
It removes from the active connection list.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1170479 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java

index 76d17e3..1c36d7c 100644 (file)
@@ -94,7 +94,7 @@ public class ProxyConnection extends JdbcInterceptor {
             return Boolean.valueOf(isClosed());
         }
         if (compare(CLOSE_VAL,method)) {
-            if (isClosed()) return null; //noop for already closed.
+            if (connection==null) return null; //noop for already closed.
             PooledConnection poolc = this.connection;
             this.connection = null;
             pool.returnConnection(poolc);