mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Stop the timer if no hook has been registered.
This commit is contained in:
@@ -151,6 +151,8 @@ class CleanupManagerImpl implements CleanupManager, Service, EventListener {
|
|||||||
if (LOG.isLoggable(WARNING)) {
|
if (LOG.isLoggable(WARNING)) {
|
||||||
LOG.warning("No cleanup hook for " + cv);
|
LOG.warning("No cleanup hook for " + cv);
|
||||||
}
|
}
|
||||||
|
// Stop the timer so we don't keep trying to delete this message
|
||||||
|
db.stopCleanupTimer(txn, m);
|
||||||
} else if (hook.deleteMessage(txn, g, m)) {
|
} else if (hook.deleteMessage(txn, g, m)) {
|
||||||
Collection<MessageId> messageIds = deleted.get(g);
|
Collection<MessageId> messageIds = deleted.get(g);
|
||||||
if (messageIds == null) {
|
if (messageIds == null) {
|
||||||
@@ -160,6 +162,7 @@ class CleanupManagerImpl implements CleanupManager, Service, EventListener {
|
|||||||
messageIds.add(m);
|
messageIds.add(m);
|
||||||
} else {
|
} else {
|
||||||
LOG.info("Message was not deleted");
|
LOG.info("Message was not deleted");
|
||||||
|
// Stop the timer so we don't keep trying to delete this message
|
||||||
db.stopCleanupTimer(txn, m);
|
db.stopCleanupTimer(txn, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user