on master help sign in
Merge pull request #322 from tekul/master
86aff5aMichael Snoyman
warp/Network/Wai/Handler/Warp.hs+1−1
@@ -122,7 +122,7 @@ setHost x y = y { settingsHost = x }
122
122
123-- | What to do with exceptions thrown by either the application or server.
123-- | What to do with exceptions thrown by either the application or server.
124-- Default: ignore server-generated exceptions (see 'InvalidRequest') and print
124-- Default: ignore server-generated exceptions (see 'InvalidRequest') and print
125−-- application-generated applications to stderr.
125+-- application-generated exceptions to stderr.
126--
126--
127-- Since 2.1.0
127-- Since 2.1.0
128setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Settings
128setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Settings
warp/Network/Wai/Handler/Warp/Run.hs+2−2
@@ -89,7 +89,7 @@ runSettings set app = withSocketsDo $
89-- 'serverPort' record.
89-- 'serverPort' record.
90--
90--
91-- When the listen socket in the second argument is closed, all live
91-- When the listen socket in the second argument is closed, all live
92−-- connections are gracefully shut-downed.
92+-- connections are gracefully shut down.
93runSettingsSocket :: Settings -> Socket -> Application -> IO ()
93runSettingsSocket :: Settings -> Socket -> Application -> IO ()
94runSettingsSocket set socket app = do
94runSettingsSocket set socket app = do
95 settingsInstallShutdownHandler set closeListenSocket
95 settingsInstallShutdownHandler set closeListenSocket
@@ -259,7 +259,7 @@ fork set mkConn addr app dc fc tm counter = settingsFork set $ \ unmask ->
259 bracket (onOpen addr) (onClose addr) $ \goingon ->
259 bracket (onOpen addr) (onClose addr) $ \goingon ->
260
260
261 -- Actually serve this connection.
261 -- Actually serve this connection.
262− -- onnClose above ensures the termination of the connection.
262+ -- bracket with closeConn above ensures the connection is closed.
263 when goingon $ serveConnection conn ii addr isSecure' set app
263 when goingon $ serveConnection conn ii addr isSecure' set app
264 where
264 where
265 closeConn (conn, _isSecure) = connClose conn
265 closeConn (conn, _isSecure) = connClose conn