[Twisted-Python] TLSMemoryBIOProtocol _shutdownTLS what to do when not successfull

Adi Roiban adi at roiban.ro
Wed Jan 16 10:47:17 EST 2013


Hi,

Here is this code in t.p.t.TLSMemoryBIOProtocol

    def _shutdownTLS(self):
        """
        Initiate, or reply to, the shutdown handshake of the TLS layer.
        """
        self._flushSendBIO()
        shutdownSuccess = self._tlsConnection.shutdown()
        self._flushSendBIO()
        if shutdownSuccess:
            # Both sides have shutdown, so we can start closing lower-level
            # transport. This will also happen if we haven't started
            # negotiation at all yet, in which case shutdown succeeds
            # immediately.
            self.transport.loseConnection()




More information about the Twisted-Python mailing list