Skip to content

Commit c48163f

Browse files
committed
Merge pull request #9 from Matthimatiker/feature/terminate_kernel
Support terminable kernels
2 parents f0b749c + dc7c5a6 commit c48163f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Bridges/HttpKernel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
1212
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
1313
use Symfony\Component\HttpFoundation\StreamedResponse as SymfonyStreamedResponse;
14+
use Symfony\Component\HttpKernel\TerminableInterface;
1415

1516
class HttpKernel implements BridgeInterface
1617
{
@@ -98,6 +99,10 @@ public function onRequest(ReactRequest $request, ReactResponse $response)
9899
}
99100

100101
self::mapResponse($response, $syResponse);
102+
103+
if ($this->application instanceof TerminableInterface) {
104+
$this->application->terminate($syRequest, $syResponse);
105+
}
101106
}
102107
});
103108
}

0 commit comments

Comments
 (0)