MCPcopy Index your code
hub / github.com/python/cpython / _do_ssl_shutdown

Method _do_ssl_shutdown

Lib/test/test_ftplib.py:371–389  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

369 self._ssl_accepting = False
370
371 def _do_ssl_shutdown(self):
372 self._ssl_closing = True
373 try:
374 self.socket = self.socket.unwrap()
375 except ssl.SSLError as err:
376 if err.args[0] in (ssl.SSL_ERROR_WANT_READ,
377 ssl.SSL_ERROR_WANT_WRITE):
378 return
379 except OSError:
380 # Any "socket error" corresponds to a SSL_ERROR_SYSCALL return
381 # from OpenSSL's SSL_shutdown(), corresponding to a
382 # closed socket condition. See also:
383 # http://www.mail-archive.com/openssl-users@openssl.org/msg60710.html
384 pass
385 self._ssl_closing = False
386 if getattr(self, '_ccc', False) is False:
387 super(SSLConnection, self).close()
388 else:
389 pass
390
391 def handle_read_event(self):
392 if self._ssl_accepting:

Callers 4

handle_read_eventMethod · 0.95
handle_write_eventMethod · 0.95
shutdownMethod · 0.95
cmd_cccMethod · 0.80

Calls 3

superClass · 0.85
unwrapMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected