From 4f29e2b353c2adec10c5754d56d8e0ba62fae426 Mon Sep 17 00:00:00 2001 From: Andrey Gursky Date: Tue, 15 May 2018 22:43:57 +0200 Subject: [PATCH] Preserve SSL handshake errors order Sets are unordered and list with push/pop acts as LIFO, though we need FIFO. Since the number of elements is tiny, no need to use deque. Addresses #9120 --- gajim/common/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gajim/common/connection.py b/gajim/common/connection.py index e14aa0cd3..fe85d2d2c 100644 --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -1333,7 +1333,8 @@ class Connection(CommonConnection, ConnectionHandlers): ssl_errors = con.Connection.ssl_errors ignored_ssl_errors = self._get_ignored_ssl_errors() - self._ssl_errors = set(ssl_errors) - set(ignored_ssl_errors) + self._ssl_errors = [n for n in ssl_errors if n not in ignored_ssl_errors] + self._ssl_errors.reverse() self.process_ssl_errors() def _get_ignored_ssl_errors(self):