summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-04 11:53:58 -0700
committerLance Stout <lancestout@gmail.com>2012-06-04 11:53:58 -0700
commit98677fd602c61e239ec8852e40b288de977dc74e (patch)
tree059b37351968331ed64f0ae83fbe18f3072977a0 /sleekxmpp
parent61a4f76c8d32c197df60edfd27c7502e66d74ce2 (diff)
downloadslixmpp-98677fd602c61e239ec8852e40b288de977dc74e.tar.gz
slixmpp-98677fd602c61e239ec8852e40b288de977dc74e.tar.bz2
slixmpp-98677fd602c61e239ec8852e40b288de977dc74e.tar.xz
slixmpp-98677fd602c61e239ec8852e40b288de977dc74e.zip
Don't add cert expiration timer if no certs are being used.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py3
1 files changed, 3 insertions, 0 deletions
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()