You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
file-backed sessions from before a broker restart never expire #172
Defect: in the file backend, ClientSession.last_seen is #[serde(skip, default = SystemTime::now)] (storage/mod.rs), so every read from disk resets it to now. cleanup_expired (file_backend.rs) re-reads sessions that exist only on disk on every sweep tick, so their expiry clock restarts each time and they never expire.
Effect: a client that never reconnects after a broker restart leaks its session file, and its queue, forever.
Fix: persist the disconnect time (or last_seen) so expiry counts from the actual disconnect across restarts. A session that was connected when the broker went down should count from the restart, or from the last persisted activity.
Test: a session with 1 s expiry, reloaded from disk and swept 3 times, is still on disk.
Activity
fabracht commentedon Sep 27, 2026
Fixed in #170 (eb9b051).