Skip to content

Commit

Permalink
Merge pull request #2290 from pjanouse/JENKINS-34448
Browse files Browse the repository at this point in the history
[JENKINS-34448] Fixed offlineCause race condition
  • Loading branch information
daniel-beck committed Apr 28, 2016
2 parents 67597a7 + 822cec6 commit b8f983b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/slaves/SlaveComputer.java
Expand Up @@ -249,7 +249,7 @@ public Object call() throws Exception {
try {
for (ComputerListener cl : ComputerListener.all())
cl.preLaunch(SlaveComputer.this, taskListener);

offlineCause = null;
launcher.launch(SlaveComputer.this, taskListener);
} catch (AbortException e) {
taskListener.error(e.getMessage());
Expand All @@ -266,7 +266,7 @@ public Object call() throws Exception {
throw e;
}
} finally {
if (channel==null) {
if (channel==null && offlineCause == null) {
offlineCause = new OfflineCause.LaunchFailed();
for (ComputerListener cl : ComputerListener.all())
cl.onLaunchFailure(SlaveComputer.this, taskListener);
Expand Down

0 comments on commit b8f983b

Please sign in to comment.