Fix getting_diff_for with empty set was being spammed

Because the above check used >= but the inner check >.
This commit is contained in:
Lonami Exo 2023-08-29 13:54:14 +02:00
parent 2011a329b0
commit 574e8876ec

View File

@ -284,8 +284,8 @@ class MessageBox:
# timeout for updates several times (it also makes sense to get difference if now is the deadline). # timeout for updates several times (it also makes sense to get difference if now is the deadline).
if now >= deadline: if now >= deadline:
# Check all expired entries and add them to the list that needs getting difference. # Check all expired entries and add them to the list that needs getting difference.
self.getting_diff_for.update(entry for entry, gap in self.possible_gaps.items() if now > gap.deadline) self.getting_diff_for.update(entry for entry, gap in self.possible_gaps.items() if now >= gap.deadline)
self.getting_diff_for.update(entry for entry, state in self.map.items() if now > state.deadline) self.getting_diff_for.update(entry for entry, state in self.map.items() if now >= state.deadline)
if __debug__: if __debug__:
self._trace('Deadlines met, now getting diff for %r', self.getting_diff_for) self._trace('Deadlines met, now getting diff for %r', self.getting_diff_for)