lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1557155 - in /lucene/dev/branches/lucene_solr_4_6: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
Date Fri, 10 Jan 2014 15:38:17 GMT
Author: markrmiller
Date: Fri Jan 10 15:38:16 2014
New Revision: 1557155

URL: http://svn.apache.org/r1557155
Log:
SOLR-5577: fix possible race on canceling timer on close

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

Modified: lucene/dev/branches/lucene_solr_4_6/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_6/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java?rev=1557155&r1=1557154&r2=1557155&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_6/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
(original)
+++ lucene/dev/branches/lucene_solr_4_6/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
Fri Jan 10 15:38:16 2014
@@ -172,8 +172,11 @@ public class ConnectionManager implement
   // to avoid deadlock on shutdown
   public void close() {
     this.isClosed = true;
-    if (this.disconnectedTimer != null) {
+    try {
       this.disconnectedTimer.cancel();
+    } catch (NullPointerException e) {
+      // fine
+    } finally {
       this.disconnectedTimer = null;
     }
   }



Mime
View raw message