More robust shutdown logic, less round-trips to Redis