Added a fallback session garbage collection for single-threaded environments