internxt / drive-desktop

https://internxt.com/drive
GNU Affero General Public License v3.0
168 stars 21 forks source link

[_] fix: do not block exit if not runing #353

Closed JoanVicens closed 1 year ago

JoanVicens commented 1 year ago

Context When we exit the app we need to stop the sync engine from watching the folder and we need to unregister the sync provider. Both of those tasks are done in the sync engine background process so we need to await a message from that process to know that it has been done.

Problem When the setup of the syn engine fails we cannot add the handler to stop the engine so when the main process tries to close it, it awaits a promise that will never be fulfilled.

Proposed solution Communicate to the main process whether the setup of the sync engine has been successful or not to await the stop message when it has been successful.

Also changed the import of virtual drive dependency to a require so it can be part of the setup function since the build of node-win can be finicky

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication