Skip to content

Commit

Permalink
Warn if Queue.cancel(Item) returns false
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Oct 25, 2023
1 parent 2688a49 commit cd9a45b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/hudson/model/AbstractItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,9 @@ public void delete() throws IOException, InterruptedException {
Item item = Tasks.getItemOf(i.task);
while (item != null) {
if (item == this) {
queue.cancel(i);
if (!queue.cancel(i)) {
LOGGER.warning(() -> "failed to cancel " + i);
}
break;
}
if (item.getParent() instanceof Item) {
Expand Down

0 comments on commit cd9a45b

Please sign in to comment.