aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@sonarsource.com>2014-08-29 12:21:57 +0200
committerStephane Gamard <stephane.gamard@sonarsource.com>2014-08-29 12:22:06 +0200
commit1f7126fddca31c7a80fe51a3eb4d77e983059fcb (patch)
treee769bd888497b22337ac50604e5ac7e977a85f89 /sonar-application/src
parentc6858dbdcf539597f16fd96327de754a72d0d3c0 (diff)
downloadsonarqube-1f7126fddca31c7a80fe51a3eb4d77e983059fcb.tar.gz
sonarqube-1f7126fddca31c7a80fe51a3eb4d77e983059fcb.zip
SONAR-4898 - fix early termination leaves search server as ghost
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index e4c5abcac51..eb7433f83dc 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -126,11 +126,6 @@ public class App implements ProcessMXBean {
@Override
public void terminate() {
- if (monitor != null && monitor.isAlive()) {
- monitor.terminate();
- monitor.interrupt();
- monitor = null;
- }
if (server != null) {
server.terminate();
server = null;
@@ -139,6 +134,11 @@ public class App implements ProcessMXBean {
elasticsearch.terminate();
elasticsearch = null;
}
+ if (monitor != null && monitor.isAlive()) {
+ monitor.terminate();
+ monitor.interrupt();
+ monitor = null;
+ }
}
private boolean isSuccess() {