Skip to content

Commit 23fa2a7

Browse files
authored
Merge pull request #7 from Micro-PHP/v1.0.6-release
Fix possible bug with flus is true
2 parents e90ebfd + e932a31 commit 23fa2a7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Business/Executor/HttpExecutorLoggerAwareDecorator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ public function execute(Request $request, bool $flush = true): Response
4040
{
4141
$response = null;
4242
try {
43-
$response = $this->decorated->execute($request, $flush);
43+
$response = $this->decorated->execute($request, false);
44+
if ($flush) {
45+
$response->send();
46+
}
47+
48+
return $response;
4449
} catch (HttpException $exception) {
4550
if ($exception->getCode() >= 500) {
4651
$this->loggerError->critical(
@@ -75,7 +80,5 @@ public function execute(Request $request, bool $flush = true): Response
7580
$this->logAccessFormatter->format($request, $response, null)
7681
);
7782
}
78-
79-
return $response;
8083
}
8184
}

0 commit comments

Comments
 (0)