Closed Zillode closed 8 years ago
On line https://github.com/syncthing/syncthing-android/blob/2ed6dac071fbb5757653054724906370e557edfc/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java#L359 there is a race condition because the PostTask might not be completed before restarting Syncthing. To solve this, an asynchronous sequence (PostTask.Then(Restart)) is required, but that might be an issue for callers which expect blocking behavior to make sure Synchting is halted before continuing.
To summarize our discussion from irc, here's what we should do:
:+1:
On line https://github.com/syncthing/syncthing-android/blob/2ed6dac071fbb5757653054724906370e557edfc/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java#L359 there is a race condition because the PostTask might not be completed before restarting Syncthing. To solve this, an asynchronous sequence (PostTask.Then(Restart)) is required, but that might be an issue for callers which expect blocking behavior to make sure Synchting is halted before continuing.