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 2010/03/04 12:53:03 UTC
svn commit: r918952 -
/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java
Author: norman
Date: Thu Mar 4 11:53:02 2010
New Revision: 918952
URL: http://svn.apache.org/viewvc?rev=918952&view=rev
Log:
We need to close the session without waiting for the buffer to get written because otherwise we will get a loop (JAMES-979). Thx to Tim for the help!
Modified:
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java
Modified: james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?rev=918952&r1=918951&r2=918952&view=diff
==============================================================================
--- james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java (original)
+++ james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java Thu Mar 4 11:53:02 2010
@@ -61,7 +61,9 @@
// logout on error not sure if that is the best way to handle it
final ImapSessionImpl imapSession = (ImapSessionImpl) session.getAttribute(IMAP_SESSION);
if (imapSession != null) imapSession.logout();
- session.close(false);
+
+ // just close the session now!
+ session.close(true);
super.exceptionCaught(session, cause);
}
@@ -99,7 +101,11 @@
// handle requests in a loop
while (handler.handleRequest(in, out, imapSession));
if (imapSession != null) imapSession.logout();
+
+ logger.debug("Thread execution complete for session " + session.getId());
+
session.close(false);
+
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org