diff options
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/WebApp.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index 29deb24df..3d2c31a89 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -127,12 +127,12 @@ getSocket h = do go' :: Int -> AddrInfo -> IO Socket go' 0 _ = error "unable to bind to local socket" go' n addr = do - r <- tryIO $ bracketOnError (open addr) sClose (useaddr addr) + r <- tryIO $ bracketOnError (open addr) close (useaddr addr) either (const $ go' (pred n) addr) return r open addr = socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) useaddr addr sock = do preparesocket sock - bindSocket sock (addrAddress addr) + bind sock (addrAddress addr) use sock #endif preparesocket sock = setSocketOption sock ReuseAddr 1 |