Fixing fall-back from IPv6 to IPv4

In the old code, a constant value was being checked. Instead, check if IPv6 was what was tried and failed. If it was, attempt fall-back to IPv4.