refresh offer TTL only if available

This commit is contained in:
woodser 2023-08-09 12:06:16 -04:00
parent c193385475
commit 3c8c0034d0

View file

@ -1650,7 +1650,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
final OpenOffer openOffer = openOffersList.get(i);
UserThread.runAfterRandomDelay(() -> {
// we need to check if in the meantime the offer has been removed
if (openOffers.contains(openOffer) && !openOffer.isDeactivated())
if (openOffers.contains(openOffer) && openOffer.isAvailable())
refreshOffer(openOffer);
}, minDelay, maxDelay, TimeUnit.MILLISECONDS);
}