'Restart the XML stream when TLS is accepted.'

def _handle_starttls_proceed(self, proceed):

    log.debug('Starting    TLS')
    if self.xmpp.start_tls():
        self.xmpp.features.add('starttls')
        raise RestartStream()
