You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2014/01/19 22:22:03 UTC

svn commit: r1559588 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java

Author: markrmiller
Date: Sun Jan 19 21:22:03 2014
New Revision: 1559588

URL: http://svn.apache.org/r1559588
Log:
SOLR-5577: Harden leaking Timer thread.

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java

Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java?rev=1559588&r1=1559587&r2=1559588&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java Sun Jan 19 21:22:03 2014
@@ -87,6 +87,12 @@ public class ConnectionManager implement
         }
         
       }, (long) (client.getZkClientTimeout() * 0.90));
+      if (isClosed) {
+        // we might have closed after getting by isClosed
+        // and before starting the new timer
+        disconnectedTimer.cancel();
+        disconnectedTimer = null;
+      }
     }
     connected = false;
     notifyAll();