Socket
Socket
Sign inDemoInstall

undici

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undici - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

21

lib/core/client.js

@@ -624,3 +624,3 @@ 'use strict'

util.destroy(socket, new InformationalError('reset'))
} else if (client[kReset]) {
} else if (client[kReset] && !client.running) {
// Destroy socket once all requests have completed.

@@ -630,5 +630,3 @@ // The request at the tail of the pipeline is the one

// have been queued since then.
if (!client.running) {
util.destroy(socket, new InformationalError('reset'))
}
util.destroy(socket, new InformationalError('reset'))
} else {

@@ -803,3 +801,6 @@ socket[kResume]()

this._handle.reading = false
this._handle.readStop()
const err = this._handle.readStop()
if (err) {
this.destroy(util.errnoException(err, 'read'))
}
}

@@ -812,3 +813,6 @@ }

this._handle.reading = true
this._handle.readStart()
const err = this._handle.readStart()
if (err) {
this.destroy(util.errnoException(err, 'read'))
}
}

@@ -935,2 +939,7 @@ }

if (client.running && !client[kKeepAlive]) {
// Don't schedule more if we know connection will reset.
return
}
if (client.running && !request.idempotent) {

@@ -937,0 +946,0 @@ // Non-idempotent request cannot be retried.

@@ -6,2 +6,3 @@ 'use strict'

const { IncomingMessage } = require('http')
const util = require('util')

@@ -80,4 +81,16 @@ function nop () {}

function errnoException (code, syscall) {
const name = util.getSystemErrorName(code)
const err = new Error(`${syscall} ${name}`)
err.errno = err
err.code = code
err.syscall = syscall
return err
}
module.exports = {
nop,
errnoException,
isStream,

@@ -84,0 +97,0 @@ isDestroyed,

{
"name": "undici",
"version": "2.0.5",
"version": "2.0.6",
"description": "An HTTP/1.1 client, written from scratch for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc