Using Electron's power monitoring, we can make sure the watchers and
the synchronization are stopped when the power is suspended and
started again when the power is resumed.
This has 2 benefits:
avoid delays to the power suspension (OSs try not to stop active
processes)
The second point seems to be particularly true on macOS where we see
the remote watcher stop working completely sometimes after a long
suspension time.
Please make sure the following boxes are checked:
[x] PR is not too big
[x] it improves UX & DX in some way
[ ] it includes unit tests matching the implementation changes
[x] it includes scenarios matching a new behaviour or has been manually tested
Using Electron's power monitoring, we can make sure the watchers and the synchronization are stopped when the power is suspended and started again when the power is resumed.
This has 2 benefits:
The second point seems to be particularly true on macOS where we see the remote watcher stop working completely sometimes after a long suspension time.
Please make sure the following boxes are checked: