1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-22 12:21:15 +00:00

Moved syncthing shutdown hack to updateState() so it's invoked on every start.

This commit is contained in:
Felix Ableitner 2014-09-28 20:57:47 +03:00
parent 2b5435c1e8
commit 78680eceb1

View file

@ -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();
}
}