mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Alive after started
This commit is contained in:
parent
7a48e957e1
commit
d6c3e0e742
1 changed files with 7 additions and 1 deletions
|
@ -5751,6 +5751,7 @@ class Core {
|
|||
private ConnectionHelper.NetworkState networkState;
|
||||
private Thread thread = new Thread();
|
||||
private Semaphore semaphore = new Semaphore(0);
|
||||
private boolean started = false;
|
||||
private boolean running = true;
|
||||
private boolean foreground = false;
|
||||
private boolean recoverable = true;
|
||||
|
@ -5859,6 +5860,7 @@ class Core {
|
|||
|
||||
void start() {
|
||||
thread.start();
|
||||
started = true;
|
||||
}
|
||||
|
||||
void stop() {
|
||||
|
@ -5867,7 +5869,11 @@ class Core {
|
|||
}
|
||||
|
||||
boolean isAlive() {
|
||||
return (running && thread.isAlive());
|
||||
if (!started)
|
||||
return true;
|
||||
if (!running)
|
||||
return false;
|
||||
return thread.isAlive();
|
||||
}
|
||||
|
||||
void join() {
|
||||
|
|
Loading…
Reference in a new issue