try {
action.execute(this);
} catch (Throwable e) {
+ if (e instanceof AssertionError && e.getCause() instanceof InterruptedException) {
+ Thread.currentThread().interrupt();
+ }
logger.warn("Message action failed.", e);
}
}
boolean returnOnTimeout,
boolean ignoreAttachments,
ReceiveMessageHandler handler
- ) throws IOException {
+ ) throws IOException, InterruptedException {
retryFailedReceivedMessages(handler, ignoreAttachments);
Set<HandleAction> queuedActions = null;
try {
action.execute(this);
} catch (Throwable e) {
+ if (e instanceof AssertionError && e.getCause() instanceof InterruptedException) {
+ Thread.currentThread().interrupt();
+ }
logger.warn("Message action failed.", e);
}
}
// Continue to wait another timeout for new messages
continue;
}
+ } catch (AssertionError e) {
+ if (e.getCause() instanceof InterruptedException) {
+ throw (InterruptedException) e.getCause();
+ } else {
+ throw e;
+ }
} catch (TimeoutException e) {
if (returnOnTimeout) return;
continue;
try {
action.execute(this);
} catch (Throwable e) {
+ if (e instanceof AssertionError && e.getCause() instanceof InterruptedException) {
+ Thread.currentThread().interrupt();
+ }
logger.warn("Message action failed.", e);
}
}
avatarStore.storeProfileAvatar(address,
outputStream -> retrieveProfileAvatar(avatarPath, profileKey, outputStream));
} catch (Throwable e) {
+ if (e instanceof AssertionError && e.getCause() instanceof InterruptedException) {
+ Thread.currentThread().interrupt();
+ }
logger.warn("Failed to download profile avatar, ignoring: {}", e.getMessage());
}
}