@@ -272,10 +272,9 @@ httpOverTls TLSSettings{..} s cachedRef params = do
272272 ctx <- TLS.contextNew backend params gen
273273 TLS.contextHookSetLogging ctx tlsLogging
274274 TLS.handshake ctx
275− readBuf <- allocateBuffer bufferSize
276275 writeBuf <- allocateBuffer bufferSize
277276 tls <- getTLSinfo ctx
278− return (conn ctx readBuf writeBuf, tls)
277+ return (conn ctx writeBuf, tls)
279278 where
280279 backend = TLS.Backend {
281280 TLS.backendFlush = return ()
@@ -283,14 +282,13 @@ httpOverTls TLSSettings{..} s cachedRef params = do
283282 , TLS.backendSend = sendAll s
284283 , TLS.backendRecv = recvTLS cachedRef s
285284 }
286− conn ctx readBuf writeBuf = Connection {
285+ conn ctx writeBuf = Connection {
287286 connSendMany = TLS.sendData ctx . L.fromChunks
288287 , connSendAll = TLS.sendData ctx . L.fromChunks . return
289288 , connSendFile = sendfile
290289 , connClose = close
291290 , connRecv = recv
292291 , connSendFileOverride = NotOverride
293− , connReadBuffer = readBuf
294292 , connWriteBuffer = writeBuf
295293 , connBufferSize = bufferSize
296294 }
@@ -310,8 +308,7 @@ httpOverTls TLSSettings{..} s cachedRef params = do
310308 void $ tickle' -- This tickles the Timer. It MUST be called per chunk.
311309 loop h $ remaining - B.length x
312310
313− close = freeBuffer readBuf `finally`
314− freeBuffer writeBuf `finally`
311+ close = freeBuffer writeBuf `finally`
315312 void (tryIO $ TLS.bye ctx) `finally`
316313 TLS.contextClose ctx
317314