You've already forked matrix-js-sdk
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user