diff options
author | Yury Selivanov <yury@magic.io> | 2017-06-11 14:46:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 14:46:53 (GMT) |
commit | 4e9dfe214dff000c5b5ad0d8bd8a393feed1d3cf (patch) | |
tree | 5f1b92271172f385c38966648b43a959d4c24886 /Lib/asyncio | |
parent | d24c8287e226ac9983caf6bb826a7b53142ee31f (diff) | |
download | cpython-4e9dfe214dff000c5b5ad0d8bd8a393feed1d3cf.zip cpython-4e9dfe214dff000c5b5ad0d8bd8a393feed1d3cf.tar.gz cpython-4e9dfe214dff000c5b5ad0d8bd8a393feed1d3cf.tar.bz2 |
Revert "[3.5] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) (#2063)" (#2113)
This reverts commit 1395c58ef7b98f087d1d5d50962fe7a8c032f34d.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/sslproto.py | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index 4606f0b..61d478e 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -7,7 +7,6 @@ except ImportError: # pragma: no cover from . import base_events from . import compat -from . import futures from . import protocols from . import transports from .log import logger @@ -412,7 +411,7 @@ class SSLProtocol(protocols.Protocol): def __init__(self, loop, app_protocol, sslcontext, waiter, server_side=False, server_hostname=None, - call_connection_made=True, shutdown_timeout=5.0): + call_connection_made=True): if ssl is None: raise RuntimeError('stdlib ssl module not available') @@ -443,8 +442,6 @@ class SSLProtocol(protocols.Protocol): self._session_established = False self._in_handshake = False self._in_shutdown = False - self._shutdown_timeout = shutdown_timeout - self._shutdown_timeout_handle = None # transport, ex: SelectorSocketTransport self._transport = None self._call_connection_made = call_connection_made @@ -559,15 +556,6 @@ class SSLProtocol(protocols.Protocol): self._in_shutdown = True self._write_appdata(b'') - if self._shutdown_timeout is not None: - self._shutdown_timeout_handle = self._loop.call_later( - self._shutdown_timeout, self._on_shutdown_timeout) - - def _on_shutdown_timeout(self): - if self._transport is not None: - self._fatal_error( - futures.TimeoutError(), 'Can not complete shitdown operation') - def _write_appdata(self, data): self._write_backlog.append((data, 0)) self._write_buffer_size += len(data) @@ -695,22 +683,12 @@ class SSLProtocol(protocols.Protocol): }) if self._transport: self._transport._force_close(exc) - self._transport = None - - if self._shutdown_timeout_handle is not None: - self._shutdown_timeout_handle.cancel() - self._shutdown_timeout_handle = None def _finalize(self): self._sslpipe = None if self._transport is not None: self._transport.close() - self._transport = None - - if self._shutdown_timeout_handle is not None: - self._shutdown_timeout_handle.cancel() - self._shutdown_timeout_handle = None def _abort(self): try: |