@@ -5,7 +5,7 @@ module Network.Wai.Handler.Warp.Run where
6import Control.Concurrent (threadDelay, forkIOWithUnmask)
6import Control.Concurrent (threadDelay, forkIOWithUnmask)
7import qualified Control.Concurrent as Conc (yield)
7import qualified Control.Concurrent as Conc (yield)
8−import Control.Exception
8+import Control.Exception as E
9import qualified Control.Exception.Lifted as Lifted
9import qualified Control.Exception.Lifted as Lifted
10import Control.Monad (forever, when, unless, void)
10import Control.Monad (forever, when, unless, void)
11import Control.Monad.IO.Class (MonadIO, liftIO)
11import Control.Monad.IO.Class (MonadIO, liftIO)
@@ -26,7 +26,6 @@ import Network.Wai.Handler.Warp.Response
26import Network.Wai.Handler.Warp.Settings
26import Network.Wai.Handler.Warp.Settings
27import qualified Network.Wai.Handler.Warp.Timeout as T
27import qualified Network.Wai.Handler.Warp.Timeout as T
28import Network.Wai.Handler.Warp.Types
28import Network.Wai.Handler.Warp.Types
29−import Prelude hiding (catch)
31#if WINDOWS
30#if WINDOWS
32import qualified Control.Concurrent.MVar as MV
31import qualified Control.Concurrent.MVar as MV
@@ -207,7 +206,7 @@ runSettingsConnectionMaker set getConn app = do
207 serveConnection th set cleaner app conn addr
206 serveConnection th set cleaner app conn addr
209 -- FIXME: only IOEception is caught. What about other exceptions?
208 -- FIXME: only IOEception is caught. What about other exceptions?
210− getConnLoop = getConn `catch` \(e :: IOException) -> do
209+ getConnLoop = getConn `E.catch` \(e :: IOException) -> do
211 onE Nothing (toException e)
210 onE Nothing (toException e)
212 -- "resource exhausted (Too many open files)" may happen by accept().
211 -- "resource exhausted (Too many open files)" may happen by accept().
213 -- Wait a second hoping that resource will be available.
212 -- Wait a second hoping that resource will be available.