mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
If the initialization thread is interrupted by contextDestroyed, make that clear.
Otherwise get a meaningless error:
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:267)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:915)
at jenkins.model.Jenkins.<init>(Jenkins.java:814)
at hudson.model.Hudson.<init>(Hudson.java:83)
at hudson.model.Hudson.<init>(Hudson.java:79)
at hudson.WebAppMain$3.run(WebAppMain.java:225)
This commit is contained in:
1 parent
6c2b16cf4a
commit
54374fc2b6
1 file changed
+3
-1
@@ -396,8 +396,10 @@ public class WebAppMain implements ServletContextListener {
|
||||
if(instance!=null)
|
||||
instance.cleanUp();
|
||||
Thread t = initThread;
|
||||
if (t!=null)
|
||||
if (t != null && t.isAlive()) {
|
||||
LOGGER.log(Level.INFO, "Shutting down a Jenkins instance that was still starting up", new Throwable("reason"));
|
||||
t.interrupt();
|
||||
}
|
||||
|
||||
// Logger is in the system classloader, so if we don't do this
|
||||
// the whole web app will never be undepoyed.
|
||||
|
||||
Reference in new issue
Block a user