@@ -145,11 +145,12 @@ timeoutBody timeoutHandle rbody = do
145 return $ do
145 return $ do
146 isFirst <- I.readIORef isFirstRef
146 isFirst <- I.readIORef isFirstRef
148− when isFirst $
148+ when isFirst $ do
149 -- Timeout handling was paused after receiving the full request
149 -- Timeout handling was paused after receiving the full request
150 -- headers. Now we need to resume it to avoid a slowloris
150 -- headers. Now we need to resume it to avoid a slowloris
151 -- attack during request body sending.
151 -- attack during request body sending.
152 Timeout.resume timeoutHandle
152 Timeout.resume timeoutHandle
153+ I.writeIORef isFirstRef False
154 bs <- rbody
155 bs <- rbody