From 2bf5382431699620f0a9ae51a725a031e4429e3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= <adomas.ven@gmail.com>
Date: Thu, 27 Apr 2017 11:40:26 +0300
Subject: [PATCH] Log errors from syncRunner concurrent caller

---
 chrome/content/zotero/xpcom/sync/syncRunner.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js
index 96ed57305..4ce1b5d73 100644
--- a/chrome/content/zotero/xpcom/sync/syncRunner.js
+++ b/chrome/content/zotero/xpcom/sync/syncRunner.js
@@ -57,9 +57,12 @@ Zotero.Sync.Runner_Module = function (options = {}) {
 	Zotero.defineProperty(this, 'apiKey', { set: val => _apiKey = val });
 	
 	Components.utils.import("resource://zotero/concurrentCaller.js");
-	this.caller = new ConcurrentCaller(4);
-	this.caller.setLogger(msg => Zotero.debug(msg));
-	this.caller.stopOnError = stopOnError;
+	this.caller = new ConcurrentCaller({
+		numConcurrent: 4,
+		stopOnError: true,
+		logger: msg => Zotero.debug(msg),
+		onError: e => Zotero.logError(e)
+	});
 	
 	var _enabled = false;
 	var _autoSyncTimer;