stop setting ai_addrconfig

This caused the code to fail on Android, which doesn't know that flag.
It seems best to let the OS default flags be used. Tested working ok on
Linux. The only difference on Linux is it might return a v4mapped ipv6
address sometimes.
This commit is contained in:
Joey Hess 2013-05-02 13:01:42 -04:00
parent 7d22a47414
commit c8b74cdfd7

View file

@ -87,10 +87,7 @@ getSocket h = do
_ -> error "unable to bind to a local socket"
where
(hostname, port) = maybe (localhost, Nothing) splitHostPort h
hints = defaultHints
{ addrFlags = [AI_ADDRCONFIG]
, addrSocketType = Stream
}
hints = defaultHints { addrSocketType = Stream }
{- Repeated attempts because bind sometimes fails for an
- unknown reason on OSX. -}
go addr = go' 100 addr