Stop the polling thread when the session is cleared