[CacheServerDBClient] Prevent the illegal state if the thread runs after cleanup() is called.