Skip to content

Commit 3974548

Browse files
author
Jason Machado Silva
committed
Add logic check to only throw DelayException if required
1 parent ab807c3 commit 3974548

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Core/Processors/ControlFlow/DelayInterceptor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public function setDelayPeriod(int $delayPeriod)
5454
*/
5555
protected function doProcess(Exchange $exchange, SerializableArray $processingContext)
5656
{
57-
throw new DelayException();
57+
if ($this->delayPeriod > 0 || $exchange->getIn()->getHeader('delay') > 0) {
58+
throw new DelayException();
59+
}
5860
}
5961
}

0 commit comments

Comments
 (0)