lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1555204 - /lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
Date Fri, 03 Jan 2014 19:06:23 GMT
Author: markrmiller
Date: Fri Jan  3 19:06:22 2014
New Revision: 1555204

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

Modified:
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java?rev=1555204&r1=1555203&r2=1555204&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
Fri Jan  3 19:06:22 2014
@@ -177,8 +177,11 @@ public class ConnectionManager implement
   public void close() {
     this.isClosed = true;
     this.likelyExpired = true;
-    if (this.disconnectedTimer != null) {
+    try {
       this.disconnectedTimer.cancel();
+    } catch (NullPointerException e) {
+      // fine
+    } finally {
       this.disconnectedTimer = null;
     }
   }



Mime
View raw message