diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ee2f5..4ae535e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG -# v1.0.4 +### v1.1.0 + +* Upgraded requestretry dependency, which fixed a bug in retry attempts + +### v1.0.4 * Updated dependencies to tiletype diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..1c3c506 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @mapbox/maps-api diff --git a/lib/tilejson.js b/lib/tilejson.js index 2f07ad0..fd36353 100644 --- a/lib/tilejson.js +++ b/lib/tilejson.js @@ -216,7 +216,7 @@ TileJSON.prototype.get = function(url, callback) { timeout: this.timeout, headers: {Connection: 'Keep-Alive'}, agent: url.indexOf('https:') === 0 ? httpsagent : agent, - maxAttempts: 1, + maxAttempts: 2, retryDelay: 0 }, function (err, res, buffer) { if (!err && res.statusCode !== 200) { diff --git a/package.json b/package.json index dc7045c..d0db6ba 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "name": "@mapbox/tilejson", "description": "Tile source backend for online tile sources", - "version": "1.0.4", + "version": "1.1.0", "author": "Mapbox (https://www.mapbox.com)", "license": "BSD-2-Clause", "contributors": [ "Konstantin Käfer " ], "dependencies": { + "@mapbox/tiletype": "~0.3.1", "agentkeepalive": "2.0.2", - "requestretry": "1.4.0", - "@mapbox/tiletype": "~0.3.1" + "requestretry": "^1.12.0" }, "devDependencies": { "eslint": "^0.24.0", diff --git a/test/tilejson.test.js b/test/tilejson.test.js index 3febda7..bef233b 100644 --- a/test/tilejson.test.js +++ b/test/tilejson.test.js @@ -381,7 +381,7 @@ tape('findID', function(assert) { tape('should abort when the server takes too long', function(assert) { tilejson.getTile(1, 0, 0, function(err, data, headers) { assert.ok(err); - assert.equal(err.message, 'ETIMEDOUT'); + assert.equal(err.message, 'ESOCKETTIMEDOUT'); assert.end(); }); });