mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Increased connect timeout to 60 seconds
This commit is contained in:
parent
96ed395994
commit
6d94984b41
1 changed files with 2 additions and 7 deletions
|
@ -91,9 +91,8 @@ public class EmailService implements AutoCloseable {
|
||||||
static final int PURPOSE_USE = 2;
|
static final int PURPOSE_USE = 2;
|
||||||
static final int PURPOSE_SEARCH = 3;
|
static final int PURPOSE_SEARCH = 3;
|
||||||
|
|
||||||
private final static int CHECK_TIMEOUT = 20 * 1000; // milliseconds
|
|
||||||
private final static int SEARCH_TIMEOUT = 2 * 60 * 1000; // milliseconds
|
private final static int SEARCH_TIMEOUT = 2 * 60 * 1000; // milliseconds
|
||||||
private final static int CONNECT_TIMEOUT = 20 * 1000; // milliseconds
|
private final static int CONNECT_TIMEOUT = 60 * 1000; // milliseconds
|
||||||
private final static int WRITE_TIMEOUT = 60 * 1000; // milliseconds
|
private final static int WRITE_TIMEOUT = 60 * 1000; // milliseconds
|
||||||
private final static int READ_TIMEOUT = 60 * 1000; // milliseconds
|
private final static int READ_TIMEOUT = 60 * 1000; // milliseconds
|
||||||
private final static int FETCH_SIZE = 1024 * 1024; // bytes, default 16K
|
private final static int FETCH_SIZE = 1024 * 1024; // bytes, default 16K
|
||||||
|
@ -151,11 +150,7 @@ public class EmailService implements AutoCloseable {
|
||||||
|
|
||||||
// TODO: make timeouts configurable?
|
// TODO: make timeouts configurable?
|
||||||
// writetimeout: one thread overhead
|
// writetimeout: one thread overhead
|
||||||
if (purpose == PURPOSE_CHECK) {
|
if (purpose == PURPOSE_SEARCH) {
|
||||||
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(CHECK_TIMEOUT));
|
|
||||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(CHECK_TIMEOUT));
|
|
||||||
properties.put("mail." + protocol + ".timeout", Integer.toString(CHECK_TIMEOUT));
|
|
||||||
} else if (purpose == PURPOSE_SEARCH) {
|
|
||||||
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(SEARCH_TIMEOUT));
|
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(SEARCH_TIMEOUT));
|
||||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
|
properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
|
||||||
properties.put("mail." + protocol + ".timeout", Integer.toString(SEARCH_TIMEOUT));
|
properties.put("mail." + protocol + ".timeout", Integer.toString(SEARCH_TIMEOUT));
|
||||||
|
|
Loading…
Reference in a new issue