From ea61f91afb43cfebc36b81d9757a50dd6163a539 Mon Sep 17 00:00:00 2001 From: "Boettger, Heiko" Date: Thu, 20 Oct 2016 08:16:49 +0200 Subject: [PATCH] Added: drainPermits to ensure update cycle is not running twice --- .../java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java b/src/main/java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java index 99ba12cb..d1d225c8 100644 --- a/src/main/java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java +++ b/src/main/java/hudson/plugins/parameterizedtrigger/TriggerBuilder.java @@ -88,6 +88,7 @@ public void finished(Result result) { public void waitForStatusChange() { try { statusChanged.tryAcquire(15, TimeUnit.SECONDS); + statusChanged.drainPermits(); } catch (InterruptedException e) { //ignore }