Fix the condition for stopping the writev_retry.