(self)
| 110 | return |
| 111 | |
| 112 | def handle_write(self): |
| 113 | try: |
| 114 | # wait for write buffer flush |
| 115 | if self.tlsStarted and not self.tlsDone and not self.write_buf: |
| 116 | #logger.debug("%s:%i TLS handshaking (write)", self.destination.host, self.destination.port) |
| 117 | self.tls_handshake() |
| 118 | else: |
| 119 | #logger.debug("%s:%i Not TLS handshaking (write)", self.destination.host, self.destination.port) |
| 120 | return AdvancedDispatcher.handle_write(self) |
| 121 | except AttributeError: |
| 122 | return AdvancedDispatcher.handle_write(self) |
| 123 | except ssl.SSLError as err: |
| 124 | if err.errno == ssl.SSL_ERROR_WANT_WRITE: |
| 125 | return 0 |
| 126 | elif err.errno in _DISCONNECTED_SSL: |
| 127 | self.handle_close() |
| 128 | return 0 |
| 129 | logger.info("SSL Error: %s", str(err)) |
| 130 | self.handle_close() |
| 131 | return |
| 132 | |
| 133 | def tls_handshake(self): |
| 134 | # wait for flush |
nothing calls this directly
no test coverage detected