Skip to content

Commit c8c2fed

Browse files
authored
Merge pull request #357 from jglick/diag-JENKINS-60507
[JENKINS-60507] Extra diagnostic log
2 parents b8c1814 + 5869a37 commit c8c2fed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,14 @@ private static final class Callback extends BodyExecutionCallback.TailCall {
955955
execution.body = null;
956956
RunningTask t = RunningTasks.get(execution.getContext());
957957
if (t != null) {
958-
LOGGER.fine(() -> "cancelling any leftover task from " + execution.getContext());
959958
boolean _stopping = t.stopping;
960959
t.stopping = true;
961960
try {
962-
Queue.getInstance().cancel(execution.state.task);
961+
if (Queue.getInstance().cancel(execution.state.task)) {
962+
LOGGER.fine(() -> "cancelled leftover task from " + execution.getContext());
963+
} else {
964+
LOGGER.fine(() -> "was unable to cancel any leftover task from " + execution.getContext());
965+
}
963966
} finally {
964967
t.stopping = _stopping;
965968
}

0 commit comments

Comments
 (0)