diff options
-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) { |