warp 1.3.5 → 1.3.5.1
raw patch · 2 files changed
+1/−18 lines, 2 files
Files
- Network/Wai/Handler/Warp/Run.hs +0/−17
- warp.cabal +1/−1
Network/Wai/Handler/Warp/Run.hs view
@@ -29,16 +29,7 @@ -- Sock.recv first tries to call recvfrom() optimistically. -- If EAGAIN returns, it polls incoming data with epoll/kqueue. -- This code first polls incoming data with epoll/kqueue.-#if !WINDOWS-#define PESSIMISTIC_RECV 1-#endif -#ifdef PESSIMISTIC_RECV-import System.Posix.Types (Fd(..))-import Control.Concurrent (threadWaitRead)-import Network.Socket (Socket(..))-#endif- #if WINDOWS import qualified Control.Concurrent.MVar as MV import Network.Socket (withSocketsDo)@@ -55,20 +46,12 @@ -- | Default action value for 'Connection' socketConnection :: Socket -> Connection-#ifdef PESSIMISTIC_RECV-socketConnection s@(MkSocket fd _ _ _ _) = Connection-#else socketConnection s = Connection-#endif { connSendMany = Sock.sendMany s , connSendAll = Sock.sendAll s , connSendFile = sendFile s , connClose = sClose s-#ifdef PESSIMISTIC_RECV- , connRecv = threadWaitRead (Fd fd) >> Sock.recv s bytesPerRead-#else , connRecv = Sock.recv s bytesPerRead-#endif } sendFile :: Socket -> FilePath -> Integer -> Integer -> IO () -> [ByteString] -> Cleaner -> IO ()
warp.cabal view
@@ -1,5 +1,5 @@ Name: warp-Version: 1.3.5+Version: 1.3.5.1 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE