server: Only set the lag from the response if it's less than the current lag.
This commit is contained in:
parent
92ff15943c
commit
fa0d870deb
1 changed files with 6 additions and 3 deletions
|
@ -1267,9 +1267,12 @@ class MatrixServer(object):
|
|||
|
||||
def handle_response(self, response):
|
||||
# type: (Response) -> None
|
||||
self.lag = response.elapsed * 1000
|
||||
self.lag_done = True
|
||||
W.bar_item_update("lag")
|
||||
response_lag = response.elapsed
|
||||
|
||||
if response_lag >= self.client.lag:
|
||||
self.lag = response_lag * 1000
|
||||
self.lag_done = True
|
||||
W.bar_item_update("lag")
|
||||
|
||||
if isinstance(response, ErrorResponse):
|
||||
self.handle_error_response(response)
|
||||
|
|
Loading…
Reference in a new issue