server: Handle case of updating the lag if we don't have a client.

This commit is contained in:
Damir Jelić 2019-01-29 15:16:34 +01:00
parent 7a908e79d0
commit 3a17c5ae96

View file

@ -1269,7 +1269,12 @@ class MatrixServer(object):
# type: (Response) -> None # type: (Response) -> None
response_lag = response.elapsed response_lag = response.elapsed
if response_lag >= self.client.lag: current_lag = 0
if self.client:
current_lag = self.client.lag
if response_lag >= current_lag:
self.lag = response_lag * 1000 self.lag = response_lag * 1000
self.lag_done = True self.lag_done = True
W.bar_item_update("lag") W.bar_item_update("lag")