@@ -268,13 +268,14 @@ mkConn tlsset s params = do
268268
269269httpOverTls :: TLS.TLSParams params => TLSSettings -> Socket -> I.IORef B.ByteString -> params -> IO (Connection, Transport)
270270httpOverTls TLSSettings{..} s cachedRef params = do
271+ pool <- newBufferPool
271272 gen <- Crypto.Random.AESCtr.makeSystem
272273 ctx <- TLS.contextNew backend params gen
273274 TLS.contextHookSetLogging ctx tlsLogging
274275 TLS.handshake ctx
275276 writeBuf <- allocateBuffer bufferSize
276277 tls <- getTLSinfo ctx
277− return (conn ctx writeBuf, tls)
278+ return (conn ctx pool writeBuf, tls)
278279 where
279280 backend = TLS.Backend {
280281 TLS.backendFlush = return ()
@@ -282,13 +283,14 @@ httpOverTls TLSSettings{..} s cachedRef params = do
282283 , TLS.backendSend = sendAll s
283284 , TLS.backendRecv = recvTLS cachedRef s
284285 }
285− conn ctx writeBuf = Connection {
286+ conn ctx pool writeBuf = Connection {
286287 connSendMany = TLS.sendData ctx . L.fromChunks
287288 , connSendAll = TLS.sendData ctx . L.fromChunks . return
288289 , connSendFile = sendfile
289290 , connClose = close
290291 , connRecv = recv
291292 , connSendFileOverride = NotOverride
293+ , connBufferPool = pool
292294 , connWriteBuffer = writeBuf
293295 , connBufferSize = bufferSize
294296 }