(self)
| 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: |
no test coverage detected