1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Better handling of network errors

This commit is contained in:
Laurent Cozic
2017-07-30 22:22:57 +02:00
parent ad1fbba78d
commit 242b6dbff8
6 changed files with 34 additions and 23 deletions

View File

@@ -112,7 +112,14 @@ class SideMenuContentComponent extends Component {
return;
}
const sync = await reg.synchronizer(Setting.value('sync.target'))
let sync = null;
try {
sync = await reg.synchronizer(Setting.value('sync.target'))
} catch (error) {
reg.logger().info('Could not acquire synchroniser:');
reg.logger().info(error);
return;
}
if (this.props.syncStarted) {
sync.cancel();