diff options
author | Mario <mario@mariovavti.com> | 2024-07-15 10:16:54 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-07-15 10:16:54 +0000 |
commit | 28c8229218c93e67c27eb3adcdafc984f24f2d3c (patch) | |
tree | 23c26c6f4e7e37745caa4864a4a4548c18f2a553 /Zotlabs | |
parent | 0bcecc4baa8665e44a459be5620e7a1943fbbaf8 (diff) | |
download | volse-hubzilla-28c8229218c93e67c27eb3adcdafc984f24f2d3c.tar.gz volse-hubzilla-28c8229218c93e67c27eb3adcdafc984f24f2d3c.tar.bz2 volse-hubzilla-28c8229218c93e67c27eb3adcdafc984f24f2d3c.zip |
always use ob_end_flush() and reduce code duplication
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Sse.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index ae8860cd2..df4a74f7b 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -133,19 +133,18 @@ class Sse extends Controller { echo "\n\n"; } - if (connection_status() != CONNECTION_NORMAL || connection_aborted()) { + if (ob_get_length() > 0) { ob_end_flush(); - flush(); + } + + flush(); + if (connection_status() != CONNECTION_NORMAL || connection_aborted()) { XConfig::Set(self::$ob_hash, 'sse', 'timestamp', NULL_DATE); XConfig::Set(self::$ob_hash, 'sse', 'notifications', []); - exit; } - ob_flush(); - flush(); - usleep($sleep); if ($result) { |