Reduced close timeout

This commit is contained in:
M66B
2018-11-08 11:08:53 +00:00
parent 079adcb246
commit f2dc80223f
3 changed files with 6 additions and 3 deletions

View File

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