mirror of
https://github.com/markqvist/LXMF.git
synced 2025-11-19 23:13:04 -05:00
Take stamp value into account when cleaning message store
This commit is contained in:
parent
383d953e06
commit
9c5fa4a066
1 changed files with 2 additions and 1 deletions
|
|
@ -1090,9 +1090,10 @@ class LXMRouter:
|
|||
for transient_id in self.propagation_entries.copy():
|
||||
entry = self.propagation_entries[transient_id]
|
||||
filepath = entry[1]
|
||||
stamp_value = entry[6]
|
||||
components = filepath.split("_")
|
||||
|
||||
if len(components) == 2 and float(components[1]) > 0 and len(os.path.split(components[0])[1]) == (RNS.Identity.HASHLENGTH//8)*2:
|
||||
if len(components) >= 3 and float(components[1]) > 0 and len(os.path.split(components[0])[1]) == (RNS.Identity.HASHLENGTH//8)*2 and int(components[2]) == stamp_value:
|
||||
timestamp = float(components[1])
|
||||
if now > timestamp+LXMRouter.MESSAGE_EXPIRY:
|
||||
RNS.log("Purging message "+RNS.prettyhexrep(transient_id)+" due to expiry", RNS.LOG_EXTREME)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue