Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-12-15 06:42:26 +0300
committerGitHub <noreply@github.com>2020-12-15 06:42:26 +0300
commitcaec48a374d9de8a1505d5b8997fea8bfc72745c (patch)
tree29620b0dbc80870439d7d71c84093fd06be5f571 /core
parent646043bcadcc23b57e7ec51e3d99a18aec8b9ec7 (diff)
Only mark process as finished after fully sending the output (#16952)
Otherwise there could be a race condition in cli multi where it thinks the process is finished, but the output hasn't been sent and written yet. Thus ending up with an "empty response" error under circumstances or only reading a partial output. This should only affect Matomo for WordPress though
Diffstat (limited to 'core')
-rw-r--r--core/CliMulti/RequestCommand.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/CliMulti/RequestCommand.php b/core/CliMulti/RequestCommand.php
index 49c521f31f..f2e07dcb94 100644
--- a/core/CliMulti/RequestCommand.php
+++ b/core/CliMulti/RequestCommand.php
@@ -78,13 +78,13 @@ class RequestCommand extends ConsoleCommand
require_once PIWIK_INCLUDE_PATH . $indexFile;
- if (!empty($process)) {
- $process->finishProcess();
- }
-
while (ob_get_level()) {
echo ob_get_clean();
}
+
+ if (!empty($process)) {
+ $process->finishProcess();
+ }
}
private function isTestModeEnabled()