Skip to content

Commit 1eb6b85

Browse files
authored
Merge pull request #725 from DamienHarper/master
Avoid OutOfMemoryException
2 parents 3f1912a + b3e4a6a commit 1eb6b85

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: pkg/enqueue/Consumption/QueueConsumer.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,11 @@ private function onProcessorException(ExtensionInterface $extension, Consumer $c
323323
}
324324
}
325325

326-
$prev = new \ReflectionProperty('Exception', 'previous');
327-
$prev->setAccessible(true);
328-
$prev->setValue($wrapper, $exception);
326+
if ($exception !== $wrapper) {
327+
$prev = new \ReflectionProperty('Exception', 'previous');
328+
$prev->setAccessible(true);
329+
$prev->setValue($wrapper, $exception);
330+
}
329331

330332
throw $e;
331333
}

0 commit comments

Comments
 (0)