From dc7c5a622ea2211352e47cf31aae124ebc7004fe Mon Sep 17 00:00:00 2001 From: Matthias Molitor Date: Mon, 31 Aug 2015 22:17:34 +0200 Subject: [PATCH] added support for terminable kernels (which is the case if the Symfony standard edition is used) --- Bridges/HttpKernel.php | 5 +++++ 1 file changed, 5 insertions(+) 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); + } } }); }