server: Reconnect if there was an error during login.

This commit is contained in:
Damir Jelić 2018-08-09 17:52:51 +02:00
parent 8fca7d19c7
commit c9ef4ac086

View file

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