Updating to handle connection failtures