You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Fixed bad connection handling in synchronizer
This commit is contained in:
@@ -74,6 +74,15 @@ class Synchronizer {
|
||||
this.logger().info('Total folders: ' + folderCount);
|
||||
this.logger().info('Total notes: ' + noteCount);
|
||||
this.logger().info('Total resources: ' + resourceCount);
|
||||
|
||||
if (report.errors.length) {
|
||||
this.logger().warn('There was some errors:');
|
||||
for (let i = 0; i < report.errors.length; i++) {
|
||||
let e = report.errors[i];
|
||||
let msg = e && e.message ? e.message : JSON.stringify(e);
|
||||
this.logger().warn(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
randomFailure(options, name) {
|
||||
@@ -136,6 +145,7 @@ class Synchronizer {
|
||||
noteConflict: 0,
|
||||
|
||||
state: this.state(),
|
||||
errors: [],
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -397,8 +407,8 @@ class Synchronizer {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
report.errors.push(error);
|
||||
this.logger().error(error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (this.cancelling()) {
|
||||
|
||||
Reference in New Issue
Block a user