mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Enable write timeout again
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user