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

fix: Restart sync loop when resuming from sleep #2370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

taratatach
Copy link
Member

@taratatach taratatach commented Dec 23, 2024

When the computer goes to sleep, we stop the synchronization lifecycle
which results in suspending the synchronization loop.

The resume() method used to call the start() method which in turn
starts the synchronization loop.
However, the resume() method now has its own actions and we forgot
to start the synchronization loop as part of them.

This resulted in changes not being synchronized although they were
detected by the watchers.

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

  When the computer goes to sleep, we stop the synchronization lifecycle
  which results in suspending the synchronization loop.

  The `resume()` method used to call the `start()` method which in turn
  starts the synchronization loop.
  However, the `resume()` method now has its own actions and we forgot
  to start the synchronization loop as part of them.

  This resulted in changes not being synchronized although they were
  detected by the watchers.
  This clarifies what the sync loop does (especially the part about
  waiting for new changes to synchronize) and avoids duplicating code
  in the `start()` and `resume()` methods.
@taratatach taratatach self-assigned this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant