Clear queued message actions after handling

Fixes #777
This commit is contained in:
AsamK 2021-10-15 19:40:45 +02:00
parent 18ad9fbb4e
commit 5648714641

View file

@ -939,9 +939,11 @@ public class ManagerImpl implements Manager {
if (hasCaughtUpWithOldMessages) { if (hasCaughtUpWithOldMessages) {
handleQueuedActions(queuedActions); handleQueuedActions(queuedActions);
queuedActions.clear();
} }
if (cachedMessage[0] != null) { if (cachedMessage[0] != null) {
if (exception instanceof UntrustedIdentityException) { if (exception instanceof UntrustedIdentityException) {
logger.debug("Keeping message with untrusted identity in message cache");
final var address = ((UntrustedIdentityException) exception).getSender(); final var address = ((UntrustedIdentityException) exception).getSender();
final var recipientId = resolveRecipient(address); final var recipientId = resolveRecipient(address);
if (!envelope.hasSourceUuid()) { if (!envelope.hasSourceUuid()) {
@ -958,6 +960,7 @@ public class ManagerImpl implements Manager {
} }
} }
handleQueuedActions(queuedActions); handleQueuedActions(queuedActions);
queuedActions.clear();
} }
@Override @Override
@ -966,6 +969,7 @@ public class ManagerImpl implements Manager {
} }
private void handleQueuedActions(final Collection<HandleAction> queuedActions) { private void handleQueuedActions(final Collection<HandleAction> queuedActions) {
logger.debug("Handling message actions");
var interrupted = false; var interrupted = false;
for (var action : queuedActions) { for (var action : queuedActions) {
try { try {