mirror of https://github.com/apache/lucene.git
SOLR-5577: fix possible race on canceling timer on close
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1555204 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4612f80e8d
commit
e8b46f76a7
|
@ -177,8 +177,11 @@ public class ConnectionManager implements Watcher {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue