Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate SyncthingRunnable start trigger (fixes #1104) #1105

Merged
merged 2 commits into from
May 27, 2018

Conversation

Catfriend1
Copy link
Contributor

Purpose
In issue #1104, I discovered faulty startup behaviour of the SyncthingService. It starts the SyncthingRunnable.run() two times which results in one starting binary instance getting killed as "two instances running" will be caught by the app and fixed.
Cause is,
| new DeviceStateHolder(SyncthingService.this, this::updateState);
already has a callback to
| updateState()
and does call it in foreground running mode and in background running condition.

Sidenote
I also suspect the "two simultaneously" starting syncthing binary instances to be the cause of some people's reported config corruption issue, e.g. https://forum.syncthing.net/t/all-settings-are-gone-after-updating-app/11514/9 .

Testing
Verified correctly working on commit 976b475 under Android 7.1.2, device lg-h815.

@AudriusButkevicius
Copy link
Member

I'll leave for @Nutomic

@Catfriend1 Catfriend1 changed the title remove duplicate SyncthingRunnable start trigger - fixes #1104 remove duplicate SyncthingRunnable start trigger (fixes #1104) May 27, 2018
@Nutomic
Copy link
Contributor

Nutomic commented May 27, 2018

Yes that makes sense.

@Nutomic Nutomic merged commit a3d4997 into syncthing:master May 27, 2018
@Catfriend1 Catfriend1 deleted the fixDoubleBinaryStarts branch May 27, 2018 22:27
@syncthing syncthing locked and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants