mirror of https://github.com/M66B/FairEmail.git
Prevent prematurely stopping send service
This commit is contained in:
parent
1141cf735f
commit
c9facb64f6
|
@ -172,6 +172,10 @@ public class ServiceSend extends LifecycleService {
|
|||
if (!ConnectionHelper.getNetworkState(ServiceSend.this).isSuitable())
|
||||
break;
|
||||
}
|
||||
|
||||
if (db.operation().getOperations(outbox.id).size() == 0)
|
||||
stopSelf();
|
||||
|
||||
} catch (Throwable ex) {
|
||||
Log.e(outbox.name, ex);
|
||||
db.folder().setFolderError(outbox.id, Helper.formatThrowable(ex));
|
||||
|
@ -186,9 +190,6 @@ public class ServiceSend extends LifecycleService {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (operations.size() == 0)
|
||||
stopSelf();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue