Don't add cert expiration timer if no certs are being used.

This commit is contained in:
Lance Stout 2012-06-04 11:53:58 -07:00
parent 61a4f76c8d
commit 98677fd602

View file

@ -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()