mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
CleanUp() call during restart() is now surrounded but try/catch, which allows the restart to continue if the cleanUp() method fails.
This commit is contained in:
1 parent
5d4ec31aa5
commit
1c94716002
4 files changed
+37
-10
No files matched your search
@@ -393,8 +393,13 @@ public class WebAppMain implements ServletContextListener {
|
||||
public void contextDestroyed(ServletContextEvent event) {
|
||||
terminated = true;
|
||||
Jenkins instance = Jenkins.getInstance();
|
||||
if(instance!=null)
|
||||
instance.cleanUp();
|
||||
try {
|
||||
if (instance != null) {
|
||||
instance.cleanUp();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to clean up. Restart will continue.", e);
|
||||
}
|
||||
Thread t = initThread;
|
||||
if (t != null && t.isAlive()) {
|
||||
LOGGER.log(Level.INFO, "Shutting down a Jenkins instance that was still starting up", new Throwable("reason"));
|
||||
|
||||
Reference in new issue
Block a user