From c9ef4ac086288ea366557c626bf4022b41404b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 9 Aug 2018 17:52:51 +0200 Subject: [PATCH] server: Reconnect if there was an error during login. --- matrix/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix/server.py b/matrix/server.py index c0c24a0..6aaff99 100644 --- a/matrix/server.py +++ b/matrix/server.py @@ -625,7 +625,8 @@ class MatrixServer(object): response.request_info.type, response.status_code)) # TODO better error handling. - if response.request_info.type == "sync": + if (response.request_info.type == "sync" or + response.request_info.type == "login"): self.disconnect() def handle_response(self, response):