diff --git a/Bridges/HttpKernel.php b/Bridges/HttpKernel.php index f2b9875..18ad8f3 100644 --- a/Bridges/HttpKernel.php +++ b/Bridges/HttpKernel.php @@ -11,6 +11,7 @@ use Symfony\Component\HttpFoundation\Request as SymfonyRequest; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; use Symfony\Component\HttpFoundation\StreamedResponse as SymfonyStreamedResponse; +use Symfony\Component\HttpKernel\TerminableInterface; class HttpKernel implements BridgeInterface { @@ -98,6 +99,10 @@ public function onRequest(ReactRequest $request, ReactResponse $response) } self::mapResponse($response, $syResponse); + + if ($this->application instanceof TerminableInterface) { + $this->application->terminate($syRequest, $syResponse); + } } }); }