diff options
author | Lance Stout <lancestout@gmail.com> | 2012-06-04 11:53:58 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-06-04 11:53:58 -0700 |
commit | 98677fd602c61e239ec8852e40b288de977dc74e (patch) | |
tree | 059b37351968331ed64f0ae83fbe18f3072977a0 /sleekxmpp | |
parent | 61a4f76c8d32c197df60edfd27c7502e66d74ce2 (diff) | |
download | slixmpp-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.py | 3 |
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() |