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

timed-out

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timed-out - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

6

index.js

@@ -6,5 +6,7 @@ 'use strict';

var host = req._headers ? (' to ' + req._headers.host) : '';
req.timeoutTimer = setTimeout(function timeoutHandler() {
req.abort();
var e = new Error('ETIMEDOUT');
var e = new Error('Connection timed out on request' + host);
e.code = 'ETIMEDOUT';

@@ -18,3 +20,3 @@ req.emit('error', e);

req.abort();
var e = new Error('ESOCKETTIMEDOUT');
var e = new Error('Socket timed out on request' + host);
e.code = 'ESOCKETTIMEDOUT';

@@ -21,0 +23,0 @@ req.emit('error', e);

{
"name": "timed-out",
"version": "1.0.0",
"version": "2.0.0",
"description": "Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,3 +5,3 @@ # timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out)

Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged.
Emit Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged.

@@ -32,3 +32,3 @@ ## Usage

*Required*
Type: `Number`
Type: `number`

@@ -35,0 +35,0 @@ Time in milliseconds before errors will be emitted and `request.abort()` call happens.

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