Revert "[3.5] bpo-29406: asyncio SSL contexts leak sockets after call… by 1st1 · Pull Request #2113 · python/cpython
from . import base_events from . import compat from . import futures from . import protocols from . import transports from .log import logger
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')
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)
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: