final boolean result;
if (isSelectedMailboxDeleted(session)) {
writeSignoff(output, session);
result = false;
} else {
ImapRequestLineReader request = new ImapRequestStreamLineReader(input, output);
final Logger logger = session.getLog();
try {
request.nextChar();
} catch (DecodingException e) {
logger.debug("Unexpected end of line. Cannot handle request: ", e);
abandon(output, session);
return false;
}
ImapResponseComposerImpl response = new ImapResponseComposerImpl(new OutputStreamImapResponseWriter(output));
if (doProcessRequest(request, response, session)) {
try {
// Consume the rest of the line, throwing away any extras.
// This allows us to clean up after a protocol error.
request.consumeLine();
} catch (DecodingException e) {
// Cannot clean up. No recovery is therefore possible.
// Abandon connection.
if (logger.isInfoEnabled()) {
logger.info("Fault during clean up: " + e.getMessage());