Skip to content

Commit

Permalink
refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Jun 27, 2016
1 parent 3a68341 commit 47996f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs
Expand Up @@ -92,7 +92,7 @@ frameSender ctx@Context{outputQ,controlQ,connectionWindow,encodeDynamicTable}
O (_,pre,out) -> do
let strm = outputStream out
writeIORef (streamPrecedence strm) pre
off' <- whenReadyOrEnqueueAgain out off $ output out off
off' <- outputOrEnqueueAgain out off
case off' of
0 -> loop 0
_ | off' > 15872 -> flushN off' >> loop 0 -- fixme: hard-coding
Expand Down Expand Up @@ -164,7 +164,7 @@ frameSender ctx@Context{outputQ,controlQ,connectionWindow,encodeDynamicTable}
maybeEnqueueNext strm (Just tbq) mnext
return off'

whenReadyOrEnqueueAgain out off body = E.handle resetStream $ do
outputOrEnqueueAgain out off = E.handle resetStream $ do
state <- readIORef $ streamState strm
if isClosed state then
return off
Expand All @@ -189,7 +189,7 @@ frameSender ctx@Context{outputQ,controlQ,connectionWindow,encodeDynamicTable}
else do
cws <- atomically $ readTVar connectionWindow -- not 0
let !lim = min cws sws
body lim
output out off lim
resetStream e = do
closed ctx strm (ResetByMe e)
let !rst = resetFrame InternalError $ streamNumber strm
Expand Down

0 comments on commit 47996f9

Please sign in to comment.