Use alternate method of differentiating between no network connection and invalid repository response in _updateScrapersRemoteCallback(), since xmlhttp.noNetwork property is no longer available
(xmlhttp.status seems to turn into a very large integer when there's a network error--I can't imagine this a fairly reliable test, but, then, neither was the previous one, and at least at the moment we're not actually using the test for anything other than an appropriate debug message)
This commit is contained in:
parent
4284132db5
commit
bf96eca337
1 changed files with 4 additions and 1 deletions
|
@ -288,7 +288,10 @@ Scholar.Schema = new function(){
|
||||||
**/
|
**/
|
||||||
function _updateScrapersRemoteCallback(xmlhttp){
|
function _updateScrapersRemoteCallback(xmlhttp){
|
||||||
if (!xmlhttp.responseXML){
|
if (!xmlhttp.responseXML){
|
||||||
if (!xmlhttp.noNetwork){
|
if (xmlhttp.status>1000){
|
||||||
|
Scholar.debug('No network connection', 2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
Scholar.debug('Invalid response from repository', 2);
|
Scholar.debug('Invalid response from repository', 2);
|
||||||
}
|
}
|
||||||
_setRepositoryTimer(SCHOLAR_CONFIG['REPOSITORY_RETRY_INTERVAL']);
|
_setRepositoryTimer(SCHOLAR_CONFIG['REPOSITORY_RETRY_INTERVAL']);
|
||||||
|
|
Loading…
Reference in a new issue