mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
Moved syncthing shutdown hack to updateState() so it's invoked on every start.
This commit is contained in:
parent
2b5435c1e8
commit
78680eceb1
1 changed files with 5 additions and 5 deletions
|
@ -153,6 +153,11 @@ public class SyncthingService extends Service {
|
|||
return;
|
||||
}
|
||||
|
||||
// HACK: Make sure there is no syncthing binary left running from an improper
|
||||
// shutdown (eg Play Store update).
|
||||
// NOTE: This will log an exception if syncthing is not actually running.
|
||||
mApi.shutdown();
|
||||
|
||||
mCurrentState = State.STARTING;
|
||||
registerOnWebGuiAvailableListener(mApi);
|
||||
new PollWebGuiAvailableTaskImpl().execute(mConfig.getWebGuiUrl());
|
||||
|
@ -256,11 +261,6 @@ public class SyncthingService extends Service {
|
|||
});
|
||||
registerOnWebGuiAvailableListener(mApi);
|
||||
Log.i(TAG, "Web GUI will be available at " + mConfig.getWebGuiUrl());
|
||||
|
||||
// HACK: Make sure there is no syncthing binary left running from an improper
|
||||
// shutdown (eg Play Store update).
|
||||
// NOTE: This will log an exception if syncthing is not actually running.
|
||||
mApi.shutdown();
|
||||
updateState();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue