fix IPv6

This is what it took for me to get ipv6 working between nodes.
Can we be more specific in which exception is caught here? I know it's existing code, but it makes sense to be strict about which exceptions we expect, and catch those, and let other exceptions fail loudly.