avoid deadlock in case of BeansException at crawl startup

This commit is contained in:
Noah Levitt
2013-09-08 00:10:27 -07:00
parent 071cbe99cd
commit a00141eef7
@@ -680,9 +680,11 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener<Appli
(ac.getCurrentLaunchId() != null ? " " + ac.getCurrentLaunchId() : ""));
}
synchronized (this) {
if (needTeardown && event instanceof StopCompleteEvent) {
doTeardown();
if (event instanceof StopCompleteEvent) {
synchronized (this) {
if (needTeardown) {
doTeardown();
}
}
}