1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 01:36:55 +00:00

Switch to separate store connection / pool size 2

This commit is contained in:
M66B 2020-08-10 19:56:20 +02:00
parent c0a6b79bb4
commit 4a20ca9c06

View file

@ -111,7 +111,6 @@ public class EmailService implements AutoCloseable {
private final static int SEARCH_TIMEOUT = 90 * 1000; // milliseconds private final static int SEARCH_TIMEOUT = 90 * 1000; // milliseconds
private final static int FETCH_SIZE = 1024 * 1024; // bytes, default 16K private final static int FETCH_SIZE = 1024 * 1024; // bytes, default 16K
private final static int POOL_SIZE = 1; // default 1
private final static int POOL_TIMEOUT = 45 * 1000; // milliseconds, default 45 sec private final static int POOL_TIMEOUT = 45 * 1000; // milliseconds, default 45 sec
private static final int APPEND_BUFFER_SIZE = 4 * 1024 * 1024; // bytes private static final int APPEND_BUFFER_SIZE = 4 * 1024 * 1024; // bytes
@ -198,9 +197,9 @@ public class EmailService implements AutoCloseable {
properties.put("mail.imap.starttls.enable", "true"); properties.put("mail.imap.starttls.enable", "true");
properties.put("mail.imap.starttls.required", Boolean.toString(!insecure)); properties.put("mail.imap.starttls.required", Boolean.toString(!insecure));
properties.put("mail." + protocol + ".separatestoreconnection", "false"); properties.put("mail." + protocol + ".separatestoreconnection", "true");
properties.put("mail." + protocol + ".connectionpool.debug", "true"); properties.put("mail." + protocol + ".connectionpool.debug", "true");
properties.put("mail." + protocol + ".connectionpoolsize", Integer.toString(POOL_SIZE)); properties.put("mail." + protocol + ".connectionpoolsize", Integer.toString(2));
properties.put("mail." + protocol + ".connectionpooltimeout", Integer.toString(POOL_TIMEOUT)); properties.put("mail." + protocol + ".connectionpooltimeout", Integer.toString(POOL_TIMEOUT));
properties.put("mail." + protocol + ".finalizecleanclose", "false"); properties.put("mail." + protocol + ".finalizecleanclose", "false");