mdns on resume fix

Please review @g-ortuno 
I would argue that since it's just used once and it's three lines there is no need to make a separate function. It makes it harder to follow the code.