on master help sign in
removing connBufferPool.
commit142d51240e11ffa0c50093cd2b017df1e5c0ee21 authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 17 Jun 2015, 11:10 (11 years ago) parent6dedbb9
3 files changed+2−7
warp-tls/Network/Wai/Handler/WarpTLS.hs+2−4 warp/Network/Wai/Handler/Warp/Run.hs−1 warp/Network/Wai/Handler/Warp/Types.hs−2
warp-tls/Network/Wai/Handler/WarpTLS.hs+2−4
@@ -266,14 +266,13 @@ mkConn tlsset s params = do
266266
267267httpOverTls :: TLS.TLSParams params => TLSSettings -> Socket -> I.IORef B.ByteString -> params -> IO (Connection, Transport)
268268httpOverTls TLSSettings{..} s cachedRef params = do
269− pool <- newBufferPool
270269 gen <- Crypto.Random.AESCtr.makeSystem
271270 ctx <- TLS.contextNew backend params gen
272271 TLS.contextHookSetLogging ctx tlsLogging
273272 TLS.handshake ctx
274273 writeBuf <- allocateBuffer bufferSize
275274 tls <- getTLSinfo ctx
276− return (conn ctx pool writeBuf, tls)
275+ return (conn ctx writeBuf, tls)
277276 where
278277 backend = TLS.Backend {
279278 TLS.backendFlush = return ()
@@ -281,13 +280,12 @@ httpOverTls TLSSettings{..} s cachedRef params = do
281280 , TLS.backendSend = sendAll s
282281 , TLS.backendRecv = recvTLS cachedRef s
283282 }
284− conn ctx pool writeBuf = Connection {
283+ conn ctx writeBuf = Connection {
285284 connSendMany = TLS.sendData ctx . L.fromChunks
286285 , connSendAll = sendall
287286 , connSendFile = sendfile
288287 , connClose = close
289288 , connRecv = recv
290− , connBufferPool = pool
291289 , connWriteBuffer = writeBuf
292290 , connBufferSize = bufferSize
293291 }
warp/Network/Wai/Handler/Warp/Run.hs−1
@@ -57,7 +57,6 @@ socketConnection s = do
5757 , connSendFile = defaultSendFile s writeBuf bufferSize sendall
5858 , connClose = sClose s >> freeBuffer writeBuf
5959 , connRecv = receive s bufferPool
60− , connBufferPool = bufferPool
6160 , connWriteBuffer = writeBuf
6261 , connBufferSize = bufferSize
6362 }
warp/Network/Wai/Handler/Warp/Types.hs−2
@@ -101,8 +101,6 @@ data Connection = Connection {
101101 , connClose :: IO ()
102102 -- | The connection receiving function.
103103 , connRecv :: IO ByteString
104− -- | This is not used at this moment.
105− , connBufferPool :: BufferPool
106104 -- | The write buffer.
107105 , connWriteBuffer :: Buffer
108106 -- | The size of the write buffer.