#8889: rewrite transient_internet so we don't use EAI_NODATA on FreeBSD.

FreeBSD doesn't have socket.EAI_NODATA.  I rewrote the routine because
there's no easy way to conditionally include a context manager in a
with statement.  As a side benefit, instead of a stack of context
managers there's now only one.
2 files changed