提交 47fa17ba 编写于 作者: J Jesse Glick

[FIXED JENKINS-23568] Be sure to release WorkspaceList.Lease deterministically in a finally block.

上级 c5c6bc05
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Possible unreleased workspace lock if SCM polling fails during setup.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23568">issue 23568</a>)
<li class=bug>
Misleading description of the 'workspace' permission.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-20148">issue 20148</a>)
......
......@@ -1451,9 +1451,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
// OTOH, if a concurrent build is chosen, the user is willing to create a multiple workspace,
// so better throughput is achieved over time (modulo the initial cost of creating that many workspaces)
// by having multiple workspaces
WorkspaceList.Lease lease = l.acquire(ws, !concurrentBuild);
Node node = lb.getBuiltOn();
Launcher launcher = ws.createLauncher(listener).decorateByEnv(getEnvironment(node,listener));
WorkspaceList.Lease lease = l.acquire(ws, !concurrentBuild);
try {
listener.getLogger().println("Polling SCM changes on " + node.getSelfLabel().getName());
LOGGER.fine("Polling SCM changes of " + getName());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册