@@ -272,10 +272,9 @@ httpOverTls TLSSettings{..} s cachedRef params = do
272 ctx <- TLS.contextNew backend params gen
272 ctx <- TLS.contextNew backend params gen
273 TLS.contextHookSetLogging ctx tlsLogging
273 TLS.contextHookSetLogging ctx tlsLogging
274 TLS.handshake ctx
274 TLS.handshake ctx
275− readBuf <- allocateBuffer bufferSize
276 writeBuf <- allocateBuffer bufferSize
275 writeBuf <- allocateBuffer bufferSize
277 tls <- getTLSinfo ctx
276 tls <- getTLSinfo ctx
278− return (conn ctx readBuf writeBuf, tls)
277+ return (conn ctx writeBuf, tls)
280 backend = TLS.Backend {
279 backend = TLS.Backend {
281 TLS.backendFlush = return ()
280 TLS.backendFlush = return ()
@@ -283,14 +282,13 @@ httpOverTls TLSSettings{..} s cachedRef params = do
283 , TLS.backendSend = sendAll s
282 , TLS.backendSend = sendAll s
284 , TLS.backendRecv = recvTLS cachedRef s
283 , TLS.backendRecv = recvTLS cachedRef s
286− conn ctx readBuf writeBuf = Connection {
285+ conn ctx writeBuf = Connection {
287 connSendMany = TLS.sendData ctx . L.fromChunks
286 connSendMany = TLS.sendData ctx . L.fromChunks
288 , connSendAll = TLS.sendData ctx . L.fromChunks . return
287 , connSendAll = TLS.sendData ctx . L.fromChunks . return
289 , connSendFile = sendfile
288 , connSendFile = sendfile
290 , connClose = close
289 , connClose = close
291 , connRecv = recv
290 , connRecv = recv
292 , connSendFileOverride = NotOverride
291 , connSendFileOverride = NotOverride
293− , connReadBuffer = readBuf
294 , connWriteBuffer = writeBuf
292 , connWriteBuffer = writeBuf
295 , connBufferSize = bufferSize
293 , connBufferSize = bufferSize
@@ -310,8 +308,7 @@ httpOverTls TLSSettings{..} s cachedRef params = do
310 void $ tickle' -- This tickles the Timer. It MUST be called per chunk.
308 void $ tickle' -- This tickles the Timer. It MUST be called per chunk.
311 loop h $ remaining - B.length x
309 loop h $ remaining - B.length x
313− close = freeBuffer readBuf `finally`
314− freeBuffer writeBuf `finally`
311+ close = freeBuffer writeBuf `finally`
315 void (tryIO $ TLS.bye ctx) `finally`
312 void (tryIO $ TLS.bye ctx) `finally`
316 TLS.contextClose ctx
313 TLS.contextClose ctx