on master help sign in
Hoist out a liftIO
commitd8e9cdcc4dcbd9a399d75ae5ab95d148745ddcc6 authorMichael Snoyman <michael@snoyman.com> dateSun 20 Apr 2014, 14:13 (12 years ago) parentce24e90
1 file changed+4−3
warp/Network/Wai/Handler/Warp/Response.hs+4−3
warp/Network/Wai/Handler/Warp/Response.hs+4−3
@@ -305,9 +305,10 @@ connSink Connection { connSendAll = send } th = sink
305305 sink = await >>= maybe close push
306306 close = liftIO (T.resume th)
307307 push x = do
308− liftIO $ T.resume th
309− liftIO $ send x
310− liftIO $ T.pause th
308+ liftIO $ do
309+ T.resume th
310+ send x
311+ T.pause th
311312 sink
312313 -- We pause timeouts before passing control back to user code. This ensures
313314 -- that a timeout will only ever be executed when Warp is in control. We