Skip to content

Commit

Permalink
frankenphp: don't stop the worker script even if a connection with a …
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored Dec 12, 2023
1 parent 6d36a65 commit ba45740
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frankenphp-symfony/src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function __construct(private HttpKernelInterface $kernel)

public function run(): int
{
// Prevent worker script termination when a client connection is interrupted
ignore_user_abort(true);

$server = array_filter($_SERVER, static fn (string $key) => !str_starts_with($key, 'HTTP_'), ARRAY_FILTER_USE_KEY);
$server['APP_RUNTIME_MODE'] = 'web=1&worker=1';

Expand Down

0 comments on commit ba45740

Please sign in to comment.