warp 3.3.18 → 3.3.19
raw patch · 4 files changed
+13/−6 lines, 4 files
Files
- ChangeLog.md +5/−0
- Network/Wai/Handler/Warp.hs +1/−1
- Network/Wai/Handler/Warp/Run.hs +6/−4
- warp.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for warp +## 3.3.19++* Allowing the eMFILE exception in acceptNewConnection.+ [#831](https://github.com/yesodweb/wai/pull/831)+ ## 3.3.18 * Tidy up HashMap and MultiMap [#864](https://github.com/yesodweb/wai/pull/864)
Network/Wai/Handler/Warp.hs view
@@ -312,7 +312,7 @@ -- -- Note that by default, the graceful shutdown mode lasts indefinitely -- (see 'setGracefulShutdownTimeout'). If you install a signal handler as above,--- upon receiving that signal, the custon shutdown action will run /and/ all+-- upon receiving that signal, the custom shutdown action will run /and/ all -- outstanding requests will be handled. -- -- You may instead prefer to do one or both of the following:
Network/Wai/Handler/Warp/Run.hs view
@@ -15,7 +15,7 @@ import qualified Data.ByteString as S import Data.IORef (newIORef, readIORef) import Data.Streaming.Network (bindPortTCP)-import Foreign.C.Error (Errno(..), eCONNABORTED)+import Foreign.C.Error (Errno(..), eCONNABORTED, eMFILE) import GHC.IO.Exception (IOException(..), IOErrorType(..)) import Network.Socket (Socket, close, accept, withSocketsDo, SockAddr, setSocketOption, SocketOption(..)) #if MIN_VERSION_network(3,1,1)@@ -269,9 +269,11 @@ case ex of Right x -> return $ Just x Left e -> do- let eConnAborted = getErrno eCONNABORTED- getErrno (Errno cInt) = cInt- if ioe_errno e == Just eConnAborted+ let getErrno (Errno cInt) = cInt+ eConnAborted = getErrno eCONNABORTED+ eMfile = getErrno eMFILE+ merrno = ioe_errno e+ if merrno == Just eConnAborted || merrno == Just eMfile then acceptNewConnection else do settingsOnException set Nothing $ toException e
warp.cabal view
@@ -1,5 +1,5 @@ Name: warp-Version: 3.3.18+Version: 3.3.19 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE