1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 08:11:17 +00:00

On exit code 1, kill Syncthing and retry start (ref #865)

This commit is contained in:
Felix Ableitner 2017-04-11 18:54:27 +09:00
parent 1b194d07b1
commit 83e3338517

View file

@ -163,6 +163,10 @@ public class SyncthingRunnable implements Runnable {
case 137: case 137:
// Syncthing was shut down (via API or SIGKILL), do nothing. // Syncthing was shut down (via API or SIGKILL), do nothing.
break; break;
case 1:
// Syncthing is already running, kill it and try again.
killSyncthing();
//fallthrough
case 3: case 3:
// Restart was requested via Rest API call. // Restart was requested via Rest API call.
Log.i(TAG, "Restarting syncthing"); Log.i(TAG, "Restarting syncthing");