Skip to content
Snippets Groups Projects
Commit 0aa96db2 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1168 Quick sync does not updates correctly the index

parent 716ee557
No related branches found
No related tags found
2 merge requests!1220Stable/ws2p v1.1 trymerge,!1208Stable/ws2p v1.1
......@@ -126,8 +126,11 @@ export class QuickSynchronizer {
// Remember expiration dates
for (const entry of index) {
if (entry.expires_on || entry.revokes_on) {
sync_expires.push(entry.expires_on || entry.revokes_on);
if (entry.expires_on) {
sync_expires.push(entry.expires_on)
}
if (entry.revokes_on) {
sync_expires.push(entry.revokes_on)
}
}
sync_expires = _.uniq(sync_expires);
......@@ -151,8 +154,8 @@ export class QuickSynchronizer {
i--;
}
}
let currentNextExpiring = sync_nextExpiring
sync_nextExpiring = sync_expires.reduce((max, value) => max ? Math.min(max, value) : value, sync_nextExpiring);
const currentNextExpiring = sync_nextExpiring
sync_nextExpiring = sync_expires.reduce((max, value) => max ? Math.min(max, value) : value, 9007199254740991); // Far far away date
const nextExpiringChanged = currentNextExpiring !== sync_nextExpiring
// Fills in correctly the SINDEX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment