big rework of error handling on requests

- central point for checking for 'error: "out of date"' response from server
- in 'out of date' state, an error dialog is shown and no further requests are sent to the server
- request queue has central point for request adding - now request count is accurate, not just for COMM requests
- request error count is cleared after a period of no requests failing
This commit is contained in:
Jon Atkins
2014-08-12 17:07:28 +01:00
parent 21463ca392
commit c8fd938cd3
3 changed files with 91 additions and 30 deletions

View File

@ -132,8 +132,6 @@ window.chat.requestFaction = function(getOlderMsgs, isRetry) {
? function() { window.chat._requestFactionRunning = false; }
: function() { window.chat.requestFaction(getOlderMsgs, true) }
);
requests.add(r);
}
@ -183,8 +181,6 @@ window.chat.requestPublic = function(getOlderMsgs, isRetry) {
? function() { window.chat._requestPublicRunning = false; }
: function() { window.chat.requestPublic(getOlderMsgs, true) }
);
requests.add(r);
}
window.chat._public = {data:{}, oldestTimestamp:-1, newestTimestamp:-1};