mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
ab3404f045
commit
df891acc75
|
@ -1337,7 +1337,7 @@ public class EmailService implements AutoCloseable {
|
|||
" reuse=" + reuse +
|
||||
" delay=" + delay);
|
||||
|
||||
if (keepAlive || BuildConfig.DEBUG) {
|
||||
if (keepAlive) {
|
||||
Log.e("Socket keep-alive=" + keepAlive);
|
||||
socket.setKeepAlive(false); // sets SOL_SOCKET/SO_KEEPALIVE
|
||||
}
|
||||
|
|
|
@ -286,7 +286,10 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
try {
|
||||
System.setProperty("fairemail.tcp_keep_alive", Boolean.toString(checked));
|
||||
if (checked)
|
||||
System.setProperty("fairemail.tcp_keep_alive", Boolean.toString(checked));
|
||||
else
|
||||
System.clearProperty("fairemail.tcp_keep_alive");
|
||||
prefs.edit().putBoolean("tcp_keep_alive", checked).apply();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
|
Loading…
Reference in New Issue