Two convicted in attack on gay man