diff --git a/warp/Network/Wai/Handler/Warp/IO.hs b/warp/Network/Wai/Handler/Warp/IO.hs index 9cc83d8cc..a25e130f3 100644 --- a/warp/Network/Wai/Handler/Warp/IO.hs +++ b/warp/Network/Wai/Handler/Warp/IO.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.IO where import Control.Exception (mask_) @@ -19,7 +20,7 @@ toBufIOWith maxRspBufSize writeBufferRef io builder = do size = bufSize writeBuffer (len, signal) <- writer buf size bufferIO buf len io - let totalBytesSent = toInteger len + bytesSent + let !totalBytesSent = toInteger len + bytesSent case signal of Done -> return totalBytesSent More minSize next