[FrameworkBundle] added a check in Client to only shutdown the kernel if a previous request has been made
This commit is contained in:
parent
3e514c6eb8
commit
807859f962
@ -25,6 +25,8 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class Client extends BaseClient
|
||||
{
|
||||
private $hasPerformedRequest = false;
|
||||
|
||||
/**
|
||||
* Returns the container.
|
||||
*
|
||||
@ -68,7 +70,11 @@ class Client extends BaseClient
|
||||
*/
|
||||
protected function doRequest($request)
|
||||
{
|
||||
if ($this->hasPerformedRequest) {
|
||||
$this->kernel->shutdown();
|
||||
} else {
|
||||
$this->hasPerformedRequest = true;
|
||||
}
|
||||
|
||||
return $this->kernel->handle($request);
|
||||
}
|
||||
|
Reference in New Issue
Block a user