mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Exit if BriarService finds lifecycle already running.
This commit is contained in:
@@ -156,8 +156,11 @@ public class BriarService extends Service {
|
|||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
started = true;
|
started = true;
|
||||||
} else if (result == ALREADY_RUNNING) {
|
} else if (result == ALREADY_RUNNING) {
|
||||||
LOG.info("Already running");
|
LOG.warning("Already running");
|
||||||
stopSelf();
|
// The LifecycleManager has outlived the BriarService
|
||||||
|
// instance that created it. Rather than trying to recover
|
||||||
|
// from this unexpected state, try to exit cleanly
|
||||||
|
shutdownFromBackground();
|
||||||
} else {
|
} else {
|
||||||
if (LOG.isLoggable(WARNING))
|
if (LOG.isLoggable(WARNING))
|
||||||
LOG.warning("Startup failed: " + result);
|
LOG.warning("Startup failed: " + result);
|
||||||
|
|||||||
Reference in New Issue
Block a user