You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/10/21 03:29:17 UTC

[james-project] 02/02: [ENHANCEMENT] Turn off Netty READs when Authenticate OAUTH

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 ec990126351d6d1323d240b629ed65cab5fd876e
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Oct 19 18:43:58 2022 +0700

    [ENHANCEMENT] Turn off Netty READs when Authenticate OAUTH
---
 .../org/apache/james/imap/processor/AuthenticateProcessor.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
index 1fc56b9ae8..e782569c64 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
@@ -99,10 +99,12 @@ public class AuthenticateProcessor extends AbstractAuthProcessor<AuthenticateReq
                 IRAuthenticateRequest irRequest = (IRAuthenticateRequest) request;
                 doOAuth(irRequest.getInitialClientResponse(), session, request, responder);
             } else {
-                responder.respond(new AuthenticateResponse());
-                session.pushLineHandler((requestSession, data) -> {
-                    doOAuth(extractInitialClientResponse(data), requestSession, request, responder);
-                    requestSession.popLineHandler();
+                session.executeSafely(() -> {
+                    responder.respond(new AuthenticateResponse());
+                    session.pushLineHandler((requestSession, data) -> {
+                        doOAuth(extractInitialClientResponse(data), requestSession, request, responder);
+                        requestSession.popLineHandler();
+                    });
                 });
             }
         } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org