From ac56488852d11a0aed9f80144d989895e3dcb91d Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Wed, 23 Mar 2022 12:02:31 +0100 Subject: [PATCH] [Prism] Reset server on kernel.terminate Fixes: ```bash In Process.php line 1292: [Exception] Cannot rewind a generator that was already run Exception trace: at app/vendor/symfony/process/Process.php:1292 IteratorIterator->rewind() at app/vendor/symfony/process/Process.php:1292 Symfony\Component\Process\Process->getDescriptors() at app/vendor/symfony/process/Process.php:307 Symfony\Component\Process\Process->start() at app/vendor/stenope/stenope/src/Highlighter/Prism.php:44 ``` --- src/Highlighter/Prism.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Highlighter/Prism.php b/src/Highlighter/Prism.php index e3ff44b9..5a0040ee 100644 --- a/src/Highlighter/Prism.php +++ b/src/Highlighter/Prism.php @@ -52,6 +52,7 @@ public function stop(): void } $this->server->stop(); + $this->server = null; $this->input->close(); }