diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-07 14:51:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-07 14:56:32 -0400 |
commit | 70ef01cc1277d288e1719ddfff4efa4d54ea9b4d (patch) | |
tree | 5d7a934034cd79b3d7b8ab44501b78ec9391a6fe /Utility/WebApp.hs | |
parent | 00c454a023e736b9434cbeb85945b1c3e6373a0d (diff) |
fix warning seen on OSX, apparently something there defines a close
Diffstat (limited to 'Utility/WebApp.hs')
-rw-r--r-- | Utility/WebApp.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index e11b3f411..cbc4ce906 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -86,10 +86,9 @@ localSocket = do go' :: Int -> AddrInfo -> IO Socket go' 0 _ = error "unable to bind to local socket" go' n addr = do - r <- tryIO $ bracketOnError (open addr) close (use addr) + r <- tryIO $ bracketOnError (open addr) sClose (use addr) either (const $ go' (pred n) addr) return r open addr = socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr) - close = sClose use addr sock = do setSocketOption sock ReuseAddr 1 bindSocket sock (addrAddress addr) |