Fix socket options if needed

This commit is contained in:
M66B 2021-12-11 07:44:29 +01:00
parent 27423cf85c
commit 5813037a73
1 changed files with 10 additions and 0 deletions

View File

@ -1157,6 +1157,16 @@ public class EmailService implements AutoCloseable {
socket.setSoLinger(false, -1);
}
if (reuse) {
Log.e("Socket reuse=" + reuse);
socket.setReuseAddress(false);
}
if (delay) {
Log.e("Socket delay=" + delay);
socket.setTcpNoDelay(false);
}
try {
boolean tcp_keep_alive = Boolean.parseBoolean(System.getProperty("fairemail.tcp_keep_alive"));
if (tcp_keep_alive) {