server: Fix reconnect delay.
This commit is contained in:
parent
08c2d0e113
commit
8edbb1bfa9
2 changed files with 3 additions and 1 deletions
1
main.py
1
main.py
|
@ -314,6 +314,7 @@ def finalize_connection(server):
|
||||||
server.fd_hook = hook
|
server.fd_hook = hook
|
||||||
server.connected = True
|
server.connected = True
|
||||||
server.connecting = False
|
server.connecting = False
|
||||||
|
server.reconnect_delay = 0
|
||||||
|
|
||||||
negotiated_protocol = server.socket.selected_alpn_protocol()
|
negotiated_protocol = server.socket.selected_alpn_protocol()
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,6 @@ class MatrixServer(object):
|
||||||
|
|
||||||
self.lag = 0
|
self.lag = 0
|
||||||
W.bar_item_update("lag")
|
W.bar_item_update("lag")
|
||||||
self.reconnect_delay = 0
|
|
||||||
self.reconnect_time = None
|
self.reconnect_time = None
|
||||||
|
|
||||||
if self.server_buffer:
|
if self.server_buffer:
|
||||||
|
@ -454,6 +453,8 @@ class MatrixServer(object):
|
||||||
|
|
||||||
if reconnect:
|
if reconnect:
|
||||||
self.schedule_reconnect()
|
self.schedule_reconnect()
|
||||||
|
else:
|
||||||
|
self.reconnect_delay = 0
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
# type: (MatrixServer) -> int
|
# type: (MatrixServer) -> int
|
||||||
|
|
Loading…
Reference in a new issue