Handling DNS error and guessing host

I don't know if this bugs appear with python 2.7?
Here is a fix a patch to fix non existant stun site and host used before been set.