mirror of
https://github.com/typeable/wai.git
synced 2025-01-07 14:51:40 +03:00
Hoist out a liftIO
This commit is contained in:
parent
ce24e90387
commit
d8e9cdcc4d
@ -305,9 +305,10 @@ connSink Connection { connSendAll = send } th = sink
|
||||
sink = await >>= maybe close push
|
||||
close = liftIO (T.resume th)
|
||||
push x = do
|
||||
liftIO $ T.resume th
|
||||
liftIO $ send x
|
||||
liftIO $ T.pause th
|
||||
liftIO $ do
|
||||
T.resume th
|
||||
send x
|
||||
T.pause th
|
||||
sink
|
||||
-- We pause timeouts before passing control back to user code. This ensures
|
||||
-- that a timeout will only ever be executed when Warp is in control. We
|
||||
|
Loading…
Reference in New Issue
Block a user