Skip to content

Commit

Permalink
bug #132 [Prism] Reset server on kernel.terminate (ogizanagi)
Browse files Browse the repository at this point in the history
This PR was merged into the 0.x-dev branch.

Discussion
----------

[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
```

Commits
-------

ac56488 [Prism] Reset server on kernel.terminate
  • Loading branch information
ogizanagi committed Mar 23, 2022
2 parents 45248fc + ac56488 commit 5b30196
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Highlighter/Prism.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function stop(): void
}

$this->server->stop();
$this->server = null;
$this->input->close();
}

Expand Down

0 comments on commit 5b30196

Please sign in to comment.