Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

featureservice

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

featureservice - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

13

CHANGELOG.md

@@ -5,5 +5,15 @@ # Change Log

## [0.2.0] - 2015-08-06
### Added
* Feature requests time out
## Changed
* Timeout set at 90 seconds
## Fixed
* Reference to non-existent functions
## [0.1.0] - 2015-08-05
### Added
* Requests time out after 5 minutes of inactivity by default
* Feature service requests time out after 5 minutes of inactivity by default

@@ -35,2 +45,3 @@ ### Changed

[0.2.0]: https://github.com/chelm/featureservice/ompare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/chelm/featureservice/ompare/v0.0.4...v0.1.0

@@ -37,0 +48,0 @@ [0.0.4]: https://github.com/chelm/featureservice/ompare/v0.0.3...v0.0.4

17

index.js

@@ -33,3 +33,3 @@ var queue = require('async').queue

this.layer = options.layer || 0
this.timeOut = 5 * 60 * 1000
this.timeOut = 1.5 * 60 * 1000

@@ -385,2 +385,3 @@ // an async for requesting pages of data

var uri = encodeURI(decodeURI(task.req))
var self = this
try {

@@ -393,2 +394,3 @@ var url_parts = urlUtils.parse(uri)

hostname: url_parts.hostname,
keepAlive: true,
path: url_parts.path,

@@ -445,2 +447,9 @@ headers: {

req.setTimeout(self.timeOut, function () {
// kill it immediately if a timeout occurs
req.end()
var err = JSON.stringify({message: 'The request timed out after ' + self.timeOut / 1000 + ' seconds.'})
catchErrors(task, err, uri, cb)
})
// we need this error catch to handle ECONNRESET

@@ -457,3 +466,3 @@ req.on('error', function (err) {

// Catch any errors and either retry the request or fail it
var catchErrors = function (task, e, url) {
var catchErrors = function (task, e, url, cb) {
if (task.retry && task.retry === 3) {

@@ -468,3 +477,3 @@ try {

}
// immediately kill
if (!task.retry) {

@@ -479,3 +488,3 @@ task.retry = 1

setTimeout(function () {
this.requestFeatures(task, cb)
this._requestFeatures(task, cb)
}.bind(this), task.retry * 1000)

@@ -482,0 +491,0 @@

{
"name": "featureservice",
"description": "a node module meant to extract every feature from an Esri geo-service thing",
"version": "0.1.0",
"version": "0.2.0",
"author": "Chris Helm",

@@ -6,0 +6,0 @@ "contributors": "Daniel Fenton",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc