warp 2.1.3.1 → 2.1.3.2
raw patch · 3 files changed
+7/−7 lines, 3 files
Files
- Network/Wai/Handler/Warp/Run.hs +5/−0
- test/RunSpec.hs +1/−6
- warp.cabal +1/−1
Network/Wai/Handler/Warp/Run.hs view
@@ -15,7 +15,12 @@ import Data.Conduit import Data.Conduit.Internal (ResumableSource (..)) import qualified Data.Conduit.List as CL+#if MIN_VERSION_conduit(1,1,0) import Data.Streaming.Network (bindPortTCP)+#else+import Data.Conduit.Network (bindPort)+#define bindPortTCP bindPort+#endif import Network (sClose, Socket) import Network.Socket (accept, SockAddr) import qualified Network.Socket.ByteString as Sock
test/RunSpec.hs view
@@ -24,12 +24,7 @@ import Test.Hspec import Control.Concurrent.MVar (newEmptyMVar, takeMVar, putMVar) import Control.Exception.Lifted (bracket, try, IOException, onException)-#if MIN_VERSION_conduit(1,1,0) import Data.Streaming.Network (bindPortTCP)-#define bindPort bindPortTCP-#else-import Data.Conduit.Network (bindPort)-#endif import Network.Socket (sClose) import qualified Network.HTTP as HTTP @@ -82,7 +77,7 @@ getPort :: IO Int getPort = do port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p)- esocket <- try $ bindPort port "*4"+ esocket <- try $ bindPortTCP port "*4" case esocket of Left (_ :: IOException) -> RunSpec.getPort Right socket -> do
warp.cabal view
@@ -1,5 +1,5 @@ Name: warp-Version: 2.1.3.1+Version: 2.1.3.2 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE