getsentry/sentry — pull request #988 by JshWright (2013-08-31 19:37:50+00:00)
Title: Enable IPv6 support for the UDP server

We make heavy use of IPv6, and would like to make use of the UDP transport.

This patch does the right thing in most cases. If you give it numeric address, it will certainly do what's expected. If you give it a hostname (and that hostname has both v4 and v6 addresses), then what happens is up to the order in which the resolver returns the addresses.

This is consistent with relevant Python socket library documentation:

>If you use a hostname in the host portion of IPv4/v6 socket address, the program may show a nondeterministic behavior, as Python uses the first address returned from the DNS resolution. The socket address will be resolved differently into an actual IPv4/v6 address, depending on the results from DNS resolution and/or the host configuration. For deterministic behavior use a numeric address in host portion.