Fix regression on IMAP select folder with thunderbird

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2136 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-06-06 22:31:31 +00:00
parent ac97a819af
commit 6fa23b25fa
1 changed files with 5 additions and 5 deletions

View File

@ -253,15 +253,15 @@ public class ImapConnection extends AbstractConnection {
// load folder in a separate thread
FolderLoadThread folderLoadThread = new FolderLoadThread(currentThread().getName(), currentFolder);
folderLoadThread.start();
os.write("* LOADING ".getBytes());
LOGGER.debug("*");
os.write('*');
while (!folderLoadThread.isComplete) {
folderLoadThread.join(10000);
folderLoadThread.join(20000);
LOGGER.debug("Still loading " + currentFolder.folderPath+" ("+currentFolder.count()+" messages)");
os.write(' ');
os.flush();
}
sendClient("COMPLETE");
sendClient("* " + currentFolder.count() + " EXISTS");
sendClient(" " + currentFolder.count() + " EXISTS");
if (folderLoadThread.exception != null) {
throw folderLoadThread.exception;
}
@ -958,7 +958,7 @@ public class ImapConnection extends AbstractConnection {
buffer.append(" {").append(baos.size()).append('}');
sendClient(buffer.toString());
// log content if less than 2K
if (LOGGER.isDebugEnabled() && baos.size() < 2048) {
if (LOGGER.isDebugEnabled() /*&& baos.size() < 2048*/) {
LOGGER.debug(new String(baos.toByteArray(), "UTF-8"));
}
os.write(baos.toByteArray());