Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #33 from jenkinsci/abort-on-fail
[FIXED JENKINS-42159] If startup fails, exit the process.
  • Loading branch information
kohsuke committed Feb 17, 2017
2 parents 7e2241e + 20cbb8a commit 046d0cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/java/winstone/HostConfiguration.java
Expand Up @@ -180,6 +180,7 @@ public void postConfigure() throws Exception {
}
};
wac.getSecurityHandler().setLoginService(loginService);
wac.setThrowUnavailableOnStartupException(true); // if boot fails, abort the process instead of letting empty Jetty run
wac.setMimeTypes(mimeTypes);
SessionManager sm = wac.getSessionHandler().getSessionManager();
sm.setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE)); // disable URL-rewrite based session tracking, which leaks session ID. See JENKINS-22358
Expand Down
1 change: 1 addition & 0 deletions src/java/winstone/Launcher.java
Expand Up @@ -352,6 +352,7 @@ public static void main(String argv[]) throws IOException {
new Launcher(args);
} catch (Throwable err) {
Logger.log(Logger.ERROR, RESOURCES, "Launcher.ContainerStartupError", err);
System.exit(1);
}
}

Expand Down

0 comments on commit 046d0cf

Please sign in to comment.