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:
Dan Stillman 2006-08-12 04:44:58 +00:00
parent 4284132db5
commit bf96eca337

View file

@ -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']);