From 98677fd602c61e239ec8852e40b288de977dc74e Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 4 Jun 2012 11:53:58 -0700 Subject: Don't add cert expiration timer if no certs are being used. --- sleekxmpp/xmlstream/xmlstream.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index e491cb5a..ac0fc256 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -816,6 +816,9 @@ class XMLStream(object): def _cert_expiration(self, event): """Schedule an event for when the TLS certificate expires.""" + if not self.use_tls and not self.use_ssl: + return + def restart(): log.warn("The server certificate has expired. Restarting.") self.reconnect() -- cgit v1.2.3