This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 08ef4028de8a049fb6e209517569d676a4cc58c7
Author: Benoit Tellier <btell...@linagora.com>
AuthorDate: Thu Mar 21 13:51:49 2019 +0700

    MAILBOX-373 deadLetter::remove operation was not bound
    
     - Depending of deadLetter implementation, the computation might not have 
been triggered.
     - Asynchronous isseus might have arised: the task could very well complete 
before the event to be removed, resulting in broken assertions
---
 .../james/webadmin/service/EventDeadLettersRedeliverService.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliverService.java
 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliverService.java
index 5aeb52b..7053c9d 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliverService.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliverService.java
@@ -55,10 +55,8 @@ public class EventDeadLettersRedeliverService {
 
     private Mono<Task.Result> redeliverGroupEvents(Group group, Event event, 
EventDeadLetters.InsertionId insertionId) {
         return eventBus.reDeliver(group, event)
-            .then(Mono.fromCallable(() -> {
-                deadLetters.remove(group, insertionId);
-                return Task.Result.COMPLETED;
-            }))
+            .then(deadLetters.remove(group, insertionId))
+            .thenReturn(Task.Result.COMPLETED)
             .onErrorResume(e -> {
                 LOGGER.error("Error while performing redelivery of event: {} 
for group: {}",
                     event.getEventId().toString(), group.asString(), e);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to