mdns on resume fix

Please review @g-ortuno 
no need to make another variable here. Just put it inside the if condition.