diff --git a/src/main/java/org/swisspush/redisques/performance/UpperBoundParallel.java b/src/main/java/org/swisspush/redisques/performance/UpperBoundParallel.java index d0a8aa1..204c293 100644 --- a/src/main/java/org/swisspush/redisques/performance/UpperBoundParallel.java +++ b/src/main/java/org/swisspush/redisques/performance/UpperBoundParallel.java @@ -132,7 +132,11 @@ private void resume(Request req) { // this boolean is just for paranoia, in case mentor tries to call back too often. final AtomicBoolean isCalled = new AtomicBoolean(); @Override public void accept(Throwable ex, Void ret) { - if (!isCalled.compareAndSet(false, true)) return; + if (!isCalled.compareAndSet(false, true)) { + if (log.isDebugEnabled()) log.warn("This callback MUST NOT be called multiple times!! Make sure caller only calls it ONCE!", new Exception("stacktrace")); + else log.warn("This callback MUST NOT be called multiple times!! Make sure caller only calls it ONCE! (enable debug log to see stack)"); + return; + } onOneDone(req, ex); } }, req.ctx);