You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2009/11/30 20:53:59 UTC
svn commit: r885569 -
/james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java
Author: norman
Date: Mon Nov 30 19:53:58 2009
New Revision: 885569
URL: http://svn.apache.org/viewvc?rev=885569&view=rev
Log:
Only send idle command if the store supports it (HUPA-56)
Modified:
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java
Modified: james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java?rev=885569&r1=885568&r2=885569&view=diff
==============================================================================
--- james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java (original)
+++ james/hupa/trunk/server/src/main/java/org/apache/hupa/server/handler/NoopHandler.java Mon Nov 30 19:53:58 2009
@@ -19,6 +19,7 @@
package org.apache.hupa.server.handler;
+import javax.mail.MessagingException;
import javax.servlet.http.HttpSession;
import net.customware.gwt.dispatch.server.ExecutionContext;
@@ -55,10 +56,16 @@
throws ActionException {
try {
IMAPStore store = cache.get(getUser());
+
if (store.getURLName() != null &&
!DemoModeConstants.DEMO_MODE.equals(store.getURLName().getHost()) ) {
- // just send a noop to keep the connection alive
- store.idle();
+
+ // check if the store supports the IDLE command
+ if (store.hasCapability("IDLE")) {
+ // just send a noop to keep the connection alive
+ store.idle();
+ }
+
}
return new NoopResult();
} catch (Exception e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org