mirror of https://github.com/M66B/FairEmail.git
Reduced close timeout
This commit is contained in:
parent
079adcb246
commit
f2dc80223f
|
@ -508,7 +508,7 @@ public class FragmentSetup extends FragmentEx {
|
|||
|
||||
private Intent getIntentHelp() {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse("https://github.com/M66B/open-source-email/blob/master/SETUP.md"));
|
||||
intent.setData(Uri.parse("https://github.com/M66B/open-source-email/blob/master/SETUP.md#setup-help"));
|
||||
return intent;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ public class MessageHelper {
|
|||
private String raw = null;
|
||||
|
||||
final static int NETWORK_TIMEOUT = 60 * 1000; // milliseconds
|
||||
final static int CLOSE_TIMEOUT = 20 * 1000; // milliseconds
|
||||
|
||||
static Properties getSessionProperties(int auth_type, boolean insecure) {
|
||||
Properties props = new Properties();
|
||||
|
|
|
@ -1172,9 +1172,11 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
});
|
||||
t.start();
|
||||
try {
|
||||
t.join(MessageHelper.NETWORK_TIMEOUT);
|
||||
if (t.isAlive())
|
||||
t.join(MessageHelper.CLOSE_TIMEOUT);
|
||||
if (t.isAlive()) {
|
||||
Log.w(Helper.TAG, account.name + " Close timeout");
|
||||
t.interrupt();
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
Log.w(Helper.TAG, account.name + " close wait " + ex.toString());
|
||||
t.interrupt();
|
||||
|
|
Loading…
Reference in New Issue