Skip to content
Permalink
Browse files
[JENKINS-34448] Fixed offlineCause race condition
  • Loading branch information
pjanouse committed Apr 27, 2016
1 parent 8a19e8a commit 822cec62dba4f31aac03afed26b575091f774342
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 822cec6

Please sign in to comment.