1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-14 16:10:39 +00:00

Enable write timeout again

This commit is contained in:
M66B 2023-12-07 18:54:32 +01:00
parent 7195603350
commit fbab8a0a02

View file

@ -235,14 +235,14 @@ public class EmailService implements AutoCloseable {
Log.i("Timeout=" + timeout);
if (purpose == PURPOSE_SEARCH) {
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(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));
} else {
int factor = 2;
if ("smtp".equals(protocol) || "smtps".equals(protocol))
factor *= 2;
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(timeout));
//properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
properties.put("mail." + protocol + ".timeout", Integer.toString(timeout * factor));
}