mirror of https://github.com/M66B/FairEmail.git
Double send read/write timeout
This commit is contained in:
parent
decd262063
commit
2f3eaea748
|
@ -203,9 +203,12 @@ public class EmailService implements AutoCloseable {
|
|||
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 * 2));
|
||||
properties.put("mail." + protocol + ".timeout", Integer.toString(timeout * 2));
|
||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
|
||||
properties.put("mail." + protocol + ".timeout", Integer.toString(timeout * factor));
|
||||
}
|
||||
|
||||
if (debug && BuildConfig.DEBUG)
|
||||
|
|
Loading…
Reference in New Issue