Skip to content

Commit

Permalink
Merge pull request #725 from DamienHarper/master
Browse files Browse the repository at this point in the history
Avoid OutOfMemoryException
  • Loading branch information
makasim committed Jan 15, 2019
2 parents 3f1912a + b3e4a6a commit 1eb6b85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/enqueue/Consumption/QueueConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,11 @@ private function onProcessorException(ExtensionInterface $extension, Consumer $c
}
}

$prev = new \ReflectionProperty('Exception', 'previous');
$prev->setAccessible(true);
$prev->setValue($wrapper, $exception);
if ($exception !== $wrapper) {
$prev = new \ReflectionProperty('Exception', 'previous');
$prev->setAccessible(true);
$prev->setValue($wrapper, $exception);
}

throw $e;
}
Expand Down

0 comments on commit 1eb6b85

Please sign in to comment.