summaryrefslogtreecommitdiff
path: root/Utility/WebApp.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-09-05 14:39:44 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-09-05 14:39:44 -0400
commit7a65879fd2cbabee30ab90763914b36d2102d653 (patch)
treefd0cdd71657bd42d69ee30f85c77f17d1bfbff32 /Utility/WebApp.hs
parent751322890adef4e1d3390bdd69b88462b9b01770 (diff)
switch away from deprecated interface
Again the new stuff works back to network-2.4, so no need to adjust cabal bounds.
Diffstat (limited to 'Utility/WebApp.hs')
-rw-r--r--Utility/WebApp.hs4
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