reduce the retry count on a non-"error:TIMEOUT" failed request

This commit is contained in:
Jon Atkins 2013-08-31 01:43:14 +01:00
parent 4a9fa8baea
commit e1891f84df

View File

@ -21,7 +21,7 @@ window.MapDataRequest = function() {
this.MAX_TILES_PER_REQUEST = 32; this.MAX_TILES_PER_REQUEST = 32;
// number of times to retty a tile after a 'bad' error (i.e. not a timeout) // number of times to retty a tile after a 'bad' error (i.e. not a timeout)
this.MAX_TILE_RETRIES = 3; this.MAX_TILE_RETRIES = 1;
// refresh timers // refresh timers
this.MOVE_REFRESH = 1; //refresh time to use after a move this.MOVE_REFRESH = 1; //refresh time to use after a move
@ -325,7 +325,7 @@ window.MapDataRequest.prototype.requeueTile = function(id, error) {
// first, see if the error can be ignored due to retry counts // first, see if the error can be ignored due to retry counts
if (error) { if (error) {
this.tileErrorCount[id] = (this.tileErrorCount[id]||0)+1; this.tileErrorCount[id] = (this.tileErrorCount[id]||0)+1;
if (this.tileErrorCount[id] < this.MAX_TILE_RETRIES) { if (this.tileErrorCount[id] <= this.MAX_TILE_RETRIES) {
// retry limit low enough - clear the error flag // retry limit low enough - clear the error flag
error = false; error = false;
} }