aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-19 23:14:47 +0000
committerMario <mario@mariovavti.com>2024-07-19 23:14:47 +0000
commit3d03c24f060994c98011a5d87b1f498325a605fe (patch)
treec760c2fb7c6603663f57df1dbb37b5ffd8736cf1 /Zotlabs
parent983fc84f283f34783b281ab047dc47c581cb937c (diff)
downloadvolse-hubzilla-3d03c24f060994c98011a5d87b1f498325a605fe.tar.gz
volse-hubzilla-3d03c24f060994c98011a5d87b1f498325a605fe.tar.bz2
volse-hubzilla-3d03c24f060994c98011a5d87b1f498325a605fe.zip
sse: reset session after connection aborted
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Sse.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php
index a5b5c7e35..daf344f2d 100644
--- a/Zotlabs/Module/Sse.php
+++ b/Zotlabs/Module/Sse.php
@@ -41,8 +41,6 @@ class Sse extends Controller {
}
}
-
-
if (self::$uid) {
self::$vnotify = get_pconfig(self::$uid, 'system', 'vnotify');
}
@@ -138,8 +136,17 @@ class Sse extends Controller {
}
if (connection_status() != CONNECTION_NORMAL || connection_aborted()) {
+
+ // IMPORTANT: in case the channel was changed we need to reset the
+ // session here to it's current stored state.
+ // Otherwise the uid might switch back to the previous value
+ // in the background.
+
+ session_reset();
+
XConfig::Set(self::$ob_hash, 'sse', 'timestamp', NULL_DATE);
XConfig::Set(self::$ob_hash, 'sse', 'notifications', []);
+
$_SESSION['sysmsg'] = [];
$_SESSION['sysmsg_info'] = [];