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:
parent
7d22a47414
commit
c8b74cdfd7
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue