diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2021-08-06 22:42:23 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2021-08-06 22:42:23 +0200 |
commit | d722b2045d028e80786109947ceef1aaffa569eb (patch) | |
tree | ab4ce32f640c3f38ff6ba1f3f2e870afeb711ef1 | |
parent | c1e61496f5c2826d897c96777906c8c9d083906c (diff) |
Network: switch to safer withFdSocket call
-rw-r--r-- | erebos.cabal | 2 | ||||
-rw-r--r-- | src/Network.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/erebos.cabal b/erebos.cabal index 4114601..73c395a 100644 --- a/erebos.cabal +++ b/erebos.cabal @@ -71,7 +71,7 @@ executable erebos memory >=0.14 && <0.17, mime >= 0.4 && < 0.5, mtl >=2.2 && <2.3, - network >= 3.0 && <3.2, + network >= 3.1 && <3.2, stm >=2.5 && <2.6, tagged >= 0.8 && <0.9, text >= 1.2 && <1.3, diff --git a/src/Network.hs b/src/Network.hs index d64124e..f857ef9 100644 --- a/src/Network.hs +++ b/src/Network.hs @@ -250,7 +250,7 @@ startServer opt origHead logd' services = do putMVar ssocket sock setSocketOption sock ReuseAddr 1 setSocketOption sock Broadcast 1 - setCloseOnExecIfNeeded =<< fdSocket sock + withFdSocket sock setCloseOnExecIfNeeded bind sock (addrAddress addr) return sock |