Skip to content

Commit 960a3f7

Browse files
committed
logTimings was being incorrectly called on a running build during Jenkins shutdown
1 parent 72bd535 commit 960a3f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jenkinsci/plugins/workflow/cps/CpsVmExecutorService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private void tearDown(ThreadContext context) {
166166
cpsThreadGroup.busy = false;
167167
context.restore();
168168
CpsFlowExecution execution = cpsThreadGroup.getExecution();
169-
if (isShutdown()) {
169+
if (isShutdown() && /* build completed, not just after suspendAll */!cpsThreadGroup.getThreads().iterator().hasNext()) {
170170
execution.logTimings();
171171
}
172172
CpsCallableInvocation.registerMismatchHandler(null);

0 commit comments

Comments
 (0)