irclib: Ignore 'sts' in case of missing keys instead of aborting the connection.

In case https://github.com/ircv3/ircv3-specifications/pull/390 gets adopted.
This commit is contained in:
Valentin Lorentz 2020-06-20 20:15:28 +02:00
parent 76ead86e2c
commit 6c4a8edb9c

View File

@ -1565,8 +1565,11 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
parsed_policy = ircutils.parseStsPolicy(
log, policy, parseDuration=secure_connection)
if parsed_policy is None:
# There was an error (and it was logged). Abort the connection.
self.driver.reconnect(wait=True)
# There was an error (and it was logged). Ignore it and proceed
# with the connection.
# Currently this shouldn't happen, but let's future-proof it, eg.
# in case https://github.com/ircv3/ircv3-specifications/pull/390
# gets adopted.
return
if secure_connection: