You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2015/05/24 00:09:15 UTC

svn commit: r1681390 - /manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java

Author: kwright
Date: Sat May 23 22:09:15 2015
New Revision: 1681390

URL: http://svn.apache.org/r1681390
Log:
Fix for CONNECTORS-1202.

Modified:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java?rev=1681390&r1=1681389&r2=1681390&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java (original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/jdbcpool/ConnectionPool.java Sat May 23 22:09:15 2015
@@ -83,6 +83,13 @@ public class ConnectionPool
             throw new InterruptedException("Pool already closed");
           rval = freeConnections[--freePointer];
           freeConnections[freePointer] = null;
+          if (!rval.isValid(1)) {
+            // If the connection is invalid, drop it on the floor, and get a new one.
+            activeConnections--;
+            rval.close();
+            rval = null;
+            continue;
+          }
           break;
         }
         if (activeConnections == freeConnections.length)