Enable write timeout again

pull/214/head
M66B 10 months ago
parent 7195603350
commit fbab8a0a02

@ -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));
}

Loading…
Cancel
Save