Skip to content
Permalink
Browse files
Merge pull request #2290 from pjanouse/JENKINS-34448
[JENKINS-34448] Fixed offlineCause race condition
  • Loading branch information
daniel-beck committed Apr 28, 2016
2 parents 67597a7 + 822cec6 commit b8f983bceb598c10263580ffc331e6ba52d0c853
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/main/java/hudson/slaves/SlaveComputer.java
@@ -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());
@@ -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);

0 comments on commit b8f983b

Please sign in to comment.