server: Fix reconnect delay.

This commit is contained in:
Damir Jelić 2018-09-03 19:20:58 +02:00
parent 08c2d0e113
commit 8edbb1bfa9
2 changed files with 3 additions and 1 deletions

View file

@ -314,6 +314,7 @@ def finalize_connection(server):
server.fd_hook = hook
server.connected = True
server.connecting = False
server.reconnect_delay = 0
negotiated_protocol = server.socket.selected_alpn_protocol()

View file

@ -443,7 +443,6 @@ class MatrixServer(object):
self.lag = 0
W.bar_item_update("lag")
self.reconnect_delay = 0
self.reconnect_time = None
if self.server_buffer:
@ -454,6 +453,8 @@ class MatrixServer(object):
if reconnect:
self.schedule_reconnect()
else:
self.reconnect_delay = 0
def connect(self):
# type: (MatrixServer) -> int