Prevent previously-"useful" buffers from staying in the BufferPool when they become un-"useful".
commit43b617b179b19615d881e3846d5c38a52ab5dd9b
authorAndrew Pritchard <awpr@google.com>
dateMon 27 Jul 2015, 21:57 (11 years ago)
parentffe32ed
warp/Network/Wai/Handler/Warp/Buffer.hs+1−1
@@ -69,7 +69,7 @@ getBuffer pool = do
6969{-# INLINE getBuffer #-}
7070
7171putBuffer :: BufferPool -> ByteString -> IO ()
72−putBuffer pool buffer = when (usefulBuffer buffer) $ writeIORef pool buffer
72+putBuffer pool buffer = writeIORef pool buffer
7373{-# INLINE putBuffer #-}
7474
7575withForeignBuffer :: ByteString -> ((Buffer, BufSize) -> IO Int) -> IO Int