Replaced two instances of loop+recv with for+iter.