Fixed calling getaddrinfo

For reference:
https://github.com/facebook/tornado/commit/520b02f3a30f95fa9a3f2636b6ba2e5c9a76a99a