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/03/22 02:01:44 UTC
[james-project] 13/29: JAMES-3715 IMAP: IdleStateHandler is not needed
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 ff9ecadba0093593c56dfe99f0e889a27f622ccb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Mar 10 15:53:41 2022 +0700
JAMES-3715 IMAP: IdleStateHandler is not needed
ImapIdleStateHandler subclasses it and is already present on the pipeline,
no need to duplicate this feature.
---
.../src/main/java/org/apache/james/imapserver/netty/IMAPServer.java | 5 -----
1 file changed, 5 deletions(-)
diff --git a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
index 15132e3..fda2bdb 100644
--- a/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
+++ b/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
@@ -54,7 +54,6 @@ import io.netty.channel.ChannelPipeline;
import io.netty.channel.group.ChannelGroup;
import io.netty.handler.ssl.SslHandler;
import io.netty.handler.stream.ChunkedWriteHandler;
-import io.netty.handler.timeout.IdleStateHandler;
/**
@@ -62,7 +61,6 @@ import io.netty.handler.timeout.IdleStateHandler;
*/
public class IMAPServer extends AbstractConfigurableAsyncServer implements ImapConstants, IMAPServerMBean, NettyConstants {
private static final Logger LOG = LoggerFactory.getLogger(IMAPServer.class);
- private static final int TIMEOUT_TIMER_DISABLED = 0;
public static class AuthenticationConfiguration {
private static final boolean PLAIN_AUTH_DISALLOWED_DEFAULT = true;
@@ -220,13 +218,10 @@ public class IMAPServer extends AbstractConfigurableAsyncServer implements ImapC
private final ChannelGroupHandler groupHandler = new ChannelGroupHandler(group);
- private final TimeUnit timeoutUnit = TimeUnit.SECONDS;
-
@Override
public void initChannel(Channel channel) throws Exception {
ChannelPipeline pipeline = channel.pipeline();
pipeline.addLast(GROUP_HANDLER, groupHandler);
- pipeline.addLast("idleHandler", new IdleStateHandler(TIMEOUT_TIMER_DISABLED, TIMEOUT_TIMER_DISABLED, timeout, timeoutUnit));
pipeline.addLast(TIMEOUT_HANDLER, new ImapIdleStateHandler(timeout));
pipeline.addLast(CONNECTION_LIMIT_HANDLER, new ConnectionLimitUpstreamHandler(IMAPServer.this.connectionLimit));
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org