Fix auth code expiry

Signed-off-by: Olivier 'reivilibre <olivier@librepush.net>
This commit is contained in:
Olivier 'reivilibre' 2024-07-06 14:31:17 +01:00
parent eb0a417c35
commit c946d99696

View File

@ -154,7 +154,9 @@ impl VolatileCodeStoreInner {
// Remove if expired
if *ts <= now {
self.expire_codes_at.pop_first();
let (_, auth_code) = self.expire_codes_at.pop_first().unwrap();
self.redeemable_codes.remove(&auth_code);
self.conflictable_codes.remove(&auth_code);
continue;
}