mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Merge branch '1777-lifecycle-manager' into 'master'
Allow process to exit if an exception is thrown during shutdown Closes #1777 See merge request briar/briar!1668
This commit is contained in:
@@ -156,8 +156,11 @@ public class BriarService extends Service {
|
||||
if (result == SUCCESS) {
|
||||
started = true;
|
||||
} else if (result == ALREADY_RUNNING) {
|
||||
LOG.info("Already running");
|
||||
stopSelf();
|
||||
LOG.warning("Already running");
|
||||
// The core has outlived the original BriarService
|
||||
// instance. We don't know how to recover from this
|
||||
// unexpected state, so try to exit cleanly
|
||||
shutdownFromBackground();
|
||||
} else {
|
||||
if (LOG.isLoggable(WARNING))
|
||||
LOG.warning("Startup failed: " + result);
|
||||
|
||||
Reference in New Issue
Block a user