From 3d6b9f4593748eb6c17bde71259520ff479ec57a Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 17 Jul 2015 14:46:52 +0100 Subject: [PATCH] Add more logging when sync requests fail. --- lib/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/client.js b/lib/client.js index ef36c851b..0c7329ae5 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1206,6 +1206,7 @@ function doInitialSync(client, historyLen) { client.emit("syncComplete"); _pollForEvents(client); }, function(err) { + console.error("/initialSync error: %s", err); client.emit("syncError", err); // TODO: Retries. }); @@ -1254,6 +1255,7 @@ function _pollForEvents(client) { var discardResult = false; var timeoutObj = setTimeout(function() { discardResult = true; + console.error("/events request timed out."); _pollForEvents(client); }, 40000); @@ -1330,6 +1332,7 @@ function _pollForEvents(client) { } _pollForEvents(self); }, function(err) { + console.error("/events error: %s", JSON.stringify(err)); if (discardResult) { return; }