aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-15 10:16:54 +0000
committerMario <mario@mariovavti.com>2024-07-15 10:16:54 +0000
commit28c8229218c93e67c27eb3adcdafc984f24f2d3c (patch)
tree23c26c6f4e7e37745caa4864a4a4548c18f2a553 /Zotlabs
parent0bcecc4baa8665e44a459be5620e7a1943fbbaf8 (diff)
downloadvolse-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.php11
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) {