提交 37843e7c 编写于 作者: K Kohsuke Kawaguchi

this is meant only for when the bootup fails

上级 11ee013b
......@@ -62,7 +62,10 @@ Upcoming changes</a>
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.423>What's new in 1.423</a> <!--=DATE=--></h3>
<!--=RC-CHANGES=-->
<ul class=image>
<li class='major bug'>
Fixed a boot problem in 1.422.
</ul>
</div><!--=END=-->
<h3><a name=v1.422>What's new in 1.422</a> (2011/07/25)</h3>
<ul class=image>
......
......@@ -212,6 +212,7 @@ public final class WebAppMain implements ServletContextListener {
initThread = new Thread("hudson initialization thread") {
@Override
public void run() {
boolean success = false;
try {
Jenkins instance = new Hudson(home, context);
context.setAttribute(APP, instance);
......@@ -224,6 +225,7 @@ public final class WebAppMain implements ServletContextListener {
User.getUnknown().getBuilds();
}
}, 1000*10);
success = true;
} catch (Error e) {
LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins",e);
context.setAttribute(APP,new HudsonFailedToLoad(e));
......@@ -233,7 +235,7 @@ public final class WebAppMain implements ServletContextListener {
context.setAttribute(APP,new HudsonFailedToLoad(e));
} finally {
Jenkins instance = Jenkins.getInstance();
if(instance!=null)
if(!success && instance!=null)
instance.cleanUp();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册