diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Address.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Address.hs b/src/Network/BitTorrent/Address.hs index ed02f7ff..b4ce96b0 100644 --- a/src/Network/BitTorrent/Address.hs +++ b/src/Network/BitTorrent/Address.hs | |||
@@ -1281,6 +1281,8 @@ getBindAddress listenPortString enabled6 = do | |||
1281 | listenAddr = | 1281 | listenAddr = |
1282 | case if enabled6 then x6s++x4s else x4s of | 1282 | case if enabled6 then x6s++x4s else x4s of |
1283 | AddrInfo { addrAddress = listenAddr } : _ -> listenAddr | 1283 | AddrInfo { addrAddress = listenAddr } : _ -> listenAddr |
1284 | _ -> SockAddrInet6 (parsePort listenPortString) 0 iN6ADDR_ANY 0 | 1284 | _ -> if enabled6 |
1285 | then SockAddrInet6 (parsePort listenPortString) 0 iN6ADDR_ANY 0 | ||
1286 | else SockAddrInet (parsePort listenPortString) iNADDR_ANY | ||
1285 | where parsePort s = fromMaybe 0 $ readMaybe s | 1287 | where parsePort s = fromMaybe 0 $ readMaybe s |
1286 | return listenAddr | 1288 | return listenAddr |