Rescue socketerrors as well

In case name resolution fails