1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-09-03 08:42:03 +03:00

Add more logging when sync requests fail.

This commit is contained in:
Kegan Dougal
2015-07-17 14:46:52 +01:00
parent 4489c85020
commit 3d6b9f4593

View File

@@ -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;
}