SOLR-5577: Harden leaking Timer thread.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1559587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-01-19 21:20:58 +00:00
parent f5dc7e22d5
commit 3b5b96a3ef
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,12 @@ public class ConnectionManager implements Watcher {
}
}, (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();