Fixing socket connection to unresolved hosts.