Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-23568] Be sure to release WorkspaceList.Lease determin…
…istically in a finally block.
  • Loading branch information
jglick committed Dec 22, 2014
1 parent c5c6bc0 commit 47fa17b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- 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>)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/AbstractProject.java
Expand Up @@ -1451,9 +1451,9 @@ private PollingResult pollWithWorkspace(TaskListener listener, SCM scm, R lb, @N
// 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());
Expand Down

1 comment on commit 47fa17b

@jglick
Copy link
Member Author

@jglick jglick commented on 47fa17b Dec 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this was supposed to be for JENKINS-26201.

Please sign in to comment.