Wrap session_count() in try/except so a DB error falls through to the heuristic fallback instead of crashing. Added a detailed docstring explaining why the DB approach is needed and the > 1 assumption (current session already exists when called).
24 KiB
24 KiB