on master help sign in
Fix code
commit650053b8060ff4746b9095e89b1d8ddc57e4ba86 authorMichael Snoyman <michael@snoyman.com> dateWed 5 Feb 2014, 07:08 (13 years ago) parent2b493d0
1 file changed+7−6
warp/Network/Wai/Handler/Warp/Run.hs+7−6
warp/Network/Wai/Handler/Warp/Run.hs+7−6
@@ -246,7 +246,7 @@ serveConnection timeoutHandle settings cleaner port app conn remoteHost' = do
246246 th = threadHandle cleaner
247247
248248 serveConnection' :: IORef Bool -> ResourceT IO ()
249− serveConnection' istatus = serveConnection'' istatus $ connSource istatus conn th
249+ serveConnection' istatus = serveConnection'' istatus $ connSource conn th istatus
250250
251251 serveConnection'' istatus fromClient = do
252252 (env, getSource) <- parseRequestInternal conn timeoutHandle port remoteHost' fromClient
@@ -257,11 +257,12 @@ serveConnection timeoutHandle settings cleaner port app conn remoteHost' = do
257257 keepAlive <- innerRunResourceT $ do
258258 res <- app env
259259
260− liftIO $ T.resume th
261− -- FIXME consider forcing evaluation of the res here to
262− -- send more meaningful error messages to the user.
263− -- However, it may affect performance.
264− writeIORef istatus False
260+ liftIO $ do
261+ T.resume th
262+ -- FIXME consider forcing evaluation of the res here to
263+ -- send more meaningful error messages to the user.
264+ -- However, it may affect performance.
265+ writeIORef istatus False
265266 sendResponse settings cleaner env conn res
266267
267268 -- flush the rest of the request body