Calling connect() before attempting to get each card UID seems to keep the connection alive.