From 52d696df3d23a2ef1d32131752634d97b7fc965c Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 5 Feb 2015 16:46:55 +0100 Subject: fix ssl shutdown in tcp mode, refs #464 --- libmproxy/protocol/tcp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmproxy/protocol/tcp.py b/libmproxy/protocol/tcp.py index d2d21829..5314b577 100644 --- a/libmproxy/protocol/tcp.py +++ b/libmproxy/protocol/tcp.py @@ -56,7 +56,9 @@ class TCPHandler(ProtocolHandler): conns.remove(src.rfile) # Shutdown connection to the other peer if dst.ssl_established: - dst.connection.shutdown() + # We can't half-close a connection, so we just close everything here. + # Sockets will be cleaned up on a higher level. + return else: dst.connection.shutdown(socket.SHUT_WR) -- cgit v1.2.3