Socket
Socket
Sign inDemoInstall

connect-timeout

Package Overview
Dependencies
6
Maintainers
8
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.4.0

7

HISTORY.md

@@ -0,1 +1,8 @@

1.4.0 / 2014-10-16
==================
* Create errors with `http-errors`
* deps: debug@~2.1.0
- Implement `DEBUG_FD` env variable support
1.3.0 / 2014-09-03

@@ -2,0 +9,0 @@ ==================

15

index.js

@@ -12,2 +12,3 @@ /*!

var createError = require('http-errors');
var debug = require('debug')('connect:timeout');

@@ -67,15 +68,9 @@ var ms = require('ms');

function generateTimeoutError(){
var err = new Error('Response timeout');
err.code = 'ETIMEDOUT';
err.status = 503;
return err;
}
function onTimeout(time, cb){
return function(){
var err = generateTimeoutError();
err.timeout = time;
cb(err);
cb(createError(503, 'Response timeout', {
code: 'ETIMEDOUT',
timeout: time
}));
};
}
{
"name": "connect-timeout",
"description": "timeout middleware",
"version": "1.3.0",
"version": "1.4.0",
"contributors": [

@@ -12,3 +12,4 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>",

"dependencies": {
"debug": "~2.0.0",
"debug": "~2.1.0",
"http-errors": "~1.2.7",
"ms": "0.6.2",

@@ -18,6 +19,6 @@ "on-headers": "~1.0.0"

"devDependencies": {
"istanbul": "0.3.0",
"istanbul": "0.3.2",
"mocha": "~1.21.4",
"should": "~4.0.4",
"supertest": "~0.13.0"
"supertest": "~0.14.0"
},

@@ -24,0 +25,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc